Commit 9588435c authored by Caroline Chen's avatar Caroline Chen Committed by Facebook GitHub Bot
Browse files

Update PR labeling workflow (#2160)

Summary:
update the labeling reminder to be triggered when PRs are closed rather than merged, because of the transition of merging through fbcode

Pull Request resolved: https://github.com/pytorch/audio/pull/2160

Reviewed By: nateanl

Differential Revision: D33642490

Pulled By: carolineechen

fbshipit-source-id: bb39c66653782694d967303065d40386689789a8
parent 7a83f84f
...@@ -66,8 +66,9 @@ if __name__ == "__main__": ...@@ -66,8 +66,9 @@ if __name__ == "__main__":
commit_hash = sys.argv[1] commit_hash = sys.argv[1]
merger, pr_number = get_pr_merger_and_number(commit_hash) merger, pr_number = get_pr_merger_and_number(commit_hash)
labels = get_labels(pr_number) if pr_number:
is_properly_labeled = bool(PRIMARY_LABELS.intersection(labels) and SECONDARY_LABELS.intersection(labels)) labels = get_labels(pr_number)
is_properly_labeled = bool(PRIMARY_LABELS.intersection(labels) and SECONDARY_LABELS.intersection(labels))
if not is_properly_labeled: if not is_properly_labeled:
print(f"@{merger}") print(f"@{merger}")
name: pr-labels name: pr-labels
on: on:
push: pull_request:
branches: types:
- main - closed
jobs: jobs:
is-properly-labeled: is-properly-labeled:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment