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 #731

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .github/labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
- name: "after coreth x subnet-evm"
color: "98E19D"
description: "To be done after merging the coreth and subnet-evm codebases"
- name: "after libevm"
color: "98E19D"
description: "To be done only after using libevm for good"
- name: "bug"
color: "d73a4a"
description: "Something isn't working"
- name: "ci"
color: "15E277"
- name: "cleanup"
color: "49C111"
- name: "dependencies"
color: "0366d6"
description: "Pull requests that update a dependency file"
- name: "Do not merge"
color: "b60205"
- name: "documentation"
color: "0075ca"
description: "Improvements or additions to documentation"
- name: "duplicate"
color: "cfd3d7"
description: "This issue or pull request already exists"
- name: "enhancement"
color: "a2eeef"
description: "New feature or request"
- name: "good first issue"
color: "7057ff"
description: "Good for newcomers"
- name: "help wanted"
color: "008672"
description: "Extra attention is needed"
- name: "incident response"
color: "DAD20E"
- name: "invalid"
color: "e4e669"
description: "This doesn't seem right"
- name: "network upgrade"
color: "1d76db"
description: "Requires network upgrade"
- name: "Pending another PR"
color: "fef2c0"
- name: "question"
color: "d876e3"
description: "Further information is requested"
- name: "reproducible load tests"
color: "1d76db"
- name: "testing"
color: "687388"
description: "Anything testing-related"
- name: "wontfix"
color: "ffffff"
description: "This will not be worked on"
24 changes: 24 additions & 0 deletions .github/workflows/labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: labels
on:
push:
branches:
- master
paths:
- .github/labels.yml
- .github/workflows/labels.yml
pull_request: # dry run only
paths:
- .github/labels.yml
- .github/workflows/labels.yml

jobs:
labeler:
permissions:
contents: read
issues: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: crazy-max/ghaction-github-labeler@v5
Copy link
Collaborator

Choose a reason for hiding this comment

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

I will play the devils advocate here. I'm not sure if using an external action justifies the advantage (at least in daily usage). Maybe I'm not seeing the exact advantage here, but it seems to me that this can just be a 5 min operation if we ever wanted to fully rename all labels (through https://github.com/ava-labs/coreth/labels). Not sure if it's worth to run a 3rd party action in every push/pull. even though the action can be something secure it still adds to the CI overhead.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The aim is to have source-controlled, reviewable (through PRs) Github labels. The rename part is only useful once, for example to rename default label names.

The action also runs in its own workflow only when labels yml files are changed, so it won't pollute on every commit.

with:
dry-run: ${{ github.event_name == 'pull_request' }}
Loading