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

Add Support for Assign and Unassign Event Types #180

Open
brian-hayward opened this issue Aug 9, 2022 · 2 comments
Open

Add Support for Assign and Unassign Event Types #180

brian-hayward opened this issue Aug 9, 2022 · 2 comments

Comments

@brian-hayward
Copy link

Thank you so much for this action, it saves our team a lot of time needing to add issues to our issues board manually.

Could you consider adding assigned and unassigned as supported action event types? We like to automatically update the status on issues if it has been assigned or unassigned. For example, if an issue is opened by our Support team without an owner assigned, and then engineer X assigns themself as the owner, we like to automatically move that issue to "In Progress". Reversely, if they remove themself from being owner such that there are no owners, we would move it back to being "Open".

@skw
Copy link
Contributor

skw commented Aug 10, 2022

@brian-hayward I haven't had a chance to test this yet but this may already work. Have you tried configuring your workflow with assigned/unassigned event types?

@austenstone
Copy link

austenstone commented Aug 12, 2022

Do this...

on:
  issues:
    types: [labeled, assigned]

jobs:
  assigned_job_beta:
    if: github.event.action == 'assigned' 
    runs-on: ubuntu-latest
    name: Add issue to project (beta)
    steps:
    - name: "Add issue that have been assigned to austenstone to project board"
      uses: actions/[email protected]
      if: contains(github.event.issue.assignees.*.login, 'austenstone')
      with:
        github-token: ${{ secrets.AUSTENSTONE_ORG_REPO_TOKEN }}
        project-url: https://github.com/orgs/github/projects/5380

or

if: github.event.action == 'assigned' && contains(github.event.issue.assignees.*.login, 'austenstone')

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

No branches or pull requests

3 participants