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
18 changes: 18 additions & 0 deletions .github/workflows/AutoAssignToSprint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
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

types: [opened]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
assign_one_project:
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

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

with:
project: 'https://github.com/orgs/3drepo/projects/22'