Skip to content

Commit

Permalink
Apply head/base comparison only when base is non-empty (i.e., there are
Browse files Browse the repository at this point in the history
valid revs).
  • Loading branch information
afranchuk authored and ahal committed Nov 18, 2024
1 parent de25eac commit 8e7fc5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/taskgraph/optimize/strategies.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def check(self, files_changed, patterns):
def should_remove_task(self, task, params, file_patterns):
# skip-unless-changed should not apply when there is no commit delta,
# such as for cron and action tasks (there will never be file changes)
if params.get("head_rev") == params.get("base_rev"):
if params.get("base_rev") and params.get("head_rev") == params.get("base_rev"):
return False

changed = self.check(params["files_changed"], file_patterns)
Expand Down

0 comments on commit 8e7fc5a

Please sign in to comment.