add-to-project
add-to-project copied to clipboard
Add Support for Assign and Unassign Event Types
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".
@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?
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')