Skip to content

Commit 7505cac

Browse files
committed
Remove unused branch sha check.
1 parent 5817016 commit 7505cac

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

scripts/gha/trigger_workflow.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,16 +68,10 @@ def main():
6868
workflows = firebase_github.list_workflows(args.token, args.workflow, args.branch)
6969
run_id = 0
7070
if "workflow_runs" in workflows:
71-
try:
72-
branch_sha = subprocess.check_output(['git', 'rev-parse', args.branch]).decode('utf-8').rstrip('\n')
73-
except subprocess.CalledProcessError as e:
74-
# Failed to get branch SHA, ignore.
75-
branch_sha = None
7671
for workflow in workflows['workflow_runs']:
7772
# Use a heuristic to get the new workflow's run ID.
7873
# Must match the branch name and commit sha, and be queued/in progress.
7974
if (workflow['status'] in ('queued', 'in_progress') and
80-
(workflow['head_sha'] == branch_sha or not branch_sha) and
8175
workflow['head_branch'] == args.branch):
8276
run_id = workflow['id']
8377
break

0 commit comments

Comments
 (0)