Skip to content

Commit 8e7fc5a

Browse files
afranchukahal
authored andcommitted
Apply head/base comparison only when base is non-empty (i.e., there are
valid revs).
1 parent de25eac commit 8e7fc5a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/taskgraph/optimize/strategies.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def check(self, files_changed, patterns):
8282
def should_remove_task(self, task, params, file_patterns):
8383
# skip-unless-changed should not apply when there is no commit delta,
8484
# such as for cron and action tasks (there will never be file changes)
85-
if params.get("head_rev") == params.get("base_rev"):
85+
if params.get("base_rev") and params.get("head_rev") == params.get("base_rev"):
8686
return False
8787

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

0 commit comments

Comments
 (0)