Skip to content
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

chore(ci): define Github labels as code with a workflow #3629

Merged
merged 1 commit into from
Jan 8, 2025

Conversation

qdm12
Copy link
Contributor

@qdm12 qdm12 commented Jan 2, 2025

Why this should be merged

Allow to track in source control the Github labels, and to easily migrate Github labels (i.e. renames).
This might be extended to the coreth and subnet-evm repositories in order to add/change labels in a source controlled/reviewable way.

How this works

New Github workflow .github/workflows/labels.yml using github/labels.yml as a source for the labels. All the label data was extracted from this API call to keep it the exact same.

How this was tested

Dry run of labeler job on this PR.

Need to be documented in RELEASES.md?

No

@qdm12 qdm12 force-pushed the qdm12/github/labels-as-code branch from 8c76133 to d5310ae Compare January 2, 2025 09:55
- exact same labels as existing ones
- allow for future tracked modifications of labels
- labels workflow dry-runs on PRs
@qdm12 qdm12 force-pushed the qdm12/github/labels-as-code branch from d5310ae to b3607e7 Compare January 2, 2025 11:10
@qdm12 qdm12 marked this pull request as ready for review January 2, 2025 11:48
@qdm12 qdm12 requested a review from marun as a code owner January 2, 2025 11:48
@qdm12 qdm12 requested a review from rrazvan1 January 3, 2025 15:27
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: crazy-max/ghaction-github-labeler@v5
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We haven't typically used "less trusted" 3rd parties like this. What are the guarantees around which repository secrets are provided to jobs like this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://docs.github.com/en/actions/security-for-github-actions/security-guides/using-secrets-in-github-actions#about-secrets

GitHub Actions can only read a secret if you explicitly include the secret in a workflow.

Seems like it should be fine.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep 😉 It may not always had been the case, so good checking!
crazy-max does a lot of things in the docker/CI space, you may see his username around again!

@StephenButtolph StephenButtolph added this pull request to the merge queue Jan 8, 2025
Merged via the queue into master with commit aef7b9e Jan 8, 2025
23 checks passed
@StephenButtolph StephenButtolph deleted the qdm12/github/labels-as-code branch January 8, 2025 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants