-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Add repo-specific condition to labeling workflows #112169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
2869b49
42d959c
6243df4
cb3ec5f
47e6882
3f82aef
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ on: | |
|
||
jobs: | ||
check-labels: | ||
if: github.repository == 'dotnet/runtime' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To @danmoseley's question:
I spent some time searching across GitHub docs and code searches, a grep.app search, and asking Copilot for best practices around this, and hard-coding either the repository name or just the repository owner name are indeed the state of the art here. Theoretically, we could set up an environment variable that would be available to all our workflow runners, and we could check that environment variable, but since I don't see anyone else doing that I think the consensus is that making this more dynamic isn't worth the effort. For any workflow that is going to be shared across repos (or at least referenced as something that could be copied into other repos), we'd want to just check the repository_owner like we do in locker.yml. For these workflows, either approach should be fine. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. checking for the repository_owner is what we do in the backport workflow: https://github.com/dotnet/arcade/blob/ccd609b1f2b18c2899d332f88fe37f13bc3f16cb/.github/workflows/backport-base.yml#L17-L21 |
||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check 'NO-MERGE' label | ||
|
Uh oh!
There was an error while loading. Please reload this page.