-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
Update triage automation to use new project board and github projectV2 API #13962
Conversation
Unassigning @matheusaaguiar. Looks like I assigned him yesterday by accident instead of adding him as a reviewer :) Sorry for the confusion. |
5858eea
to
66e21c5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good on the surface, I'm assuming you tested it though because I did not go too deep into details of the commands. At least looks like it should either work or break in an obvious way.
I mostly have some stylistic/readability comments. Also one question about behavior in case the issue is already on the board.
@@ -6,11 +6,10 @@ on: | |||
- opened | |||
|
|||
env: | |||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |||
GH_TOKEN: ${{ secrets.PROJECT_BOARD_AUTOMATION }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commenting on it to remember that we need to change this before we merge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like we already have it there. Last updated in September though - hopefully it's up to date.
66e21c5
to
d14192f
Compare
Just realized now that as we are migrating from the classic GH project API we could actually just use the actions/add-to-project. The configuration would be much simpler and we would not be required to deal directly with the graphql API. Anyway, either will work, so I can replace the action by something like below and activate the jobs:
add-to-project:
name: Add issue ${{ github.event.issue.number }} to Triage column
runs-on: ubuntu-latest
steps:
- uses: actions/add-to-project@v0.4.0
with:
project-url: https://github.com/orgs/${{ env.ORGANIZATION }}/projects/${{ env.PROJECT_NUMBER }}
github-token: ${{ secrets.PROJECT_BOARD_AUTOMATION }} However, using the graphql API directly give us more control over the project boards and allows us to manage everything from one place (i.e. the action config). |
This pull request is stale because it has been open for 14 days with no activity. |
This pull request is stale because it has been open for 14 days with no activity. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just realized now that as we are migrating from the classic GH project API we could actually just use the actions/add-to-project.
Yeah, using an official action would be a better solution. The GraphQL API is really not great for our use case because even the simplest things (like this PR) look overcomplicated. And I don't think we need all of its flexibility now.
Still, we need this solved already so that we can close the old project board. I'm going to merge it anyway and you can refactor it in a follow-up PR.
d14192f
to
a6c809f
Compare
@r0qs It's failing: https://github.com/ethereum/solidity/actions/runs/4808604722/jobs/8558790280 Maybe the token is outdated after all? |
By the way, we should switch this to non-dry run because it's not "dry" anyway. Merging this PR disabled the old mechanism and we have nothing in place. |
Yes, it looks liked. Can you renew it and ensure that it has the following permissions?
|
Please see: #14161 |
Fixes #13892
It requires the PAT named
PROJECT_BOARD_AUTOMATION
with the following permissions: