-
Notifications
You must be signed in to change notification settings - Fork 38
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
ISSUE #3662 - Create Github action to auto add issues to the Sprint Project #3663
Conversation
runs-on: ubuntu-latest | ||
name: Assign to One Project | ||
steps: | ||
- name: Assign NEW issues to sprint proect |
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.
typo
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.
Also it'll be good to rename this to OnNewIssueOrPR
as that's the trigger, we can add more jobs that's irrelevant to assigning projects in the future in the same script
name: Auto Assign to Sprint Project | ||
|
||
on: | ||
issues: |
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.
will be good to trigger it on PRs as well
steps: | ||
- name: Assign NEW issues to sprint proect | ||
uses: srggrs/assign-one-project-github-action@1.2.1 | ||
if: github.event.action == 'opened' |
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.
do you need this?
I think this always evaluates to true. on L5 you already specified the trigger is that an issue is opened to be the action.
I think the example you followed only did it because it was also being triggered when someone added a label
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 the if statement on L16? I assume we still need the 'uses' on L15?
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.
yep
@mosment3DRepo Have you tried this script? Looking at the github issues on the repo, the API doesn't support v2 github projects: srggrs/assign-one-project-github-action#89 The issue creator did add a link to suggest how to make it work (or maybe there's another github action script?) |
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.
see comment above
just realised I was testing it on a v1 project on my personal account it looks like this one might work https://github.com/marketplace/actions/add-to-github-projects |
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.
This is working. We need to setup an organisation secret to run this.
Assigning the PR to @keifgwinn
We need a secret with repo
and project
privileges with the name PROJ_MANAGEMENT_TOKEN
, accessible by all repos and it should just work
Can merge once the secret is in place
This fixes #3662