File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
packit_service/worker/checker Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -143,23 +143,25 @@ def _pre_check(self) -> bool:
143143 return False
144144 return True
145145
146+
146147class AreFilesChanged (Checker , GetCoprBuildJobHelperForIdMixin ):
147148 """
148149 Check if any files under the current package's `paths` field is changed.
149150 If not, then just skip the current copr build job.
150151 """
152+
151153 def get_previous_git_ref (self ) -> Optional [str ]:
152154 """
153155 Get the previous git ref if any.
154156 """
155157 if self .job_config .trigger == JobConfigTriggerType .pull_request :
156158 # For PRs return the target branch
157159 return self .copr_build_helper .pull_request_object .target_branch
158- elif self .job_config .trigger == JobConfigTriggerType .commit :
160+ if self .job_config .trigger == JobConfigTriggerType .commit :
159161 # For branch commits return the effective `HEAD^` commit
160162 current_commit = self .copr_build_helper .metadata .commit_sha
161163 return f"{ current_commit } ^"
162- elif self .job_config .trigger == JobConfigTriggerType .release :
164+ if self .job_config .trigger == JobConfigTriggerType .release :
163165 # For releases we don't do any checks
164166 return None
165167
You can’t perform that action at this time.
0 commit comments