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

ISSUE #3662 - Create Github action to auto add issues to the Sprint Project #3663

Merged
merged 8 commits into from
Sep 29, 2022

Conversation

mosment3DRepo
Copy link
Contributor

This fixes #3662

runs-on: ubuntu-latest
name: Assign to One Project
steps:
- name: Assign NEW issues to sprint proect
Copy link
Member

Choose a reason for hiding this comment

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

typo

Copy link
Member

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:
Copy link
Member

@carmenfan carmenfan Sep 26, 2022

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'
Copy link
Member

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

Copy link
Contributor Author

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?

Copy link
Member

Choose a reason for hiding this comment

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

yep

@carmenfan carmenfan self-assigned this Sep 27, 2022
@carmenfan
Copy link
Member

@mosment3DRepo Have you tried this script?
it doesn't work for me:
image

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?)

Copy link
Member

@carmenfan carmenfan left a comment

Choose a reason for hiding this comment

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

see comment above

@mosment3DRepo
Copy link
Contributor Author

@mosment3DRepo Have you tried this script? it doesn't work for me: image

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?)

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

Copy link
Member

@carmenfan carmenfan left a 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

@carmenfan carmenfan assigned keifgwinn and unassigned carmenfan Sep 28, 2022
@keifgwinn keifgwinn merged commit 435d7f7 into master Sep 29, 2022
@keifgwinn keifgwinn deleted the ISSUE_3662 branch September 29, 2022 10:40
@keifgwinn keifgwinn linked an issue Oct 4, 2022 that may be closed by this pull request
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.

Create Github action to auto add issues to the Sprint Project
3 participants