🤖 Automate GitHub Project cards with any webhook event
This action allows you to use any of the pull_request
and issue
webhook events to automate your project cards. For example when an issue
is opened
create a card in the Backlog project, Triage column.
If the pull_request
or issue
has a card it will be moved to the column provided. Otherwise the card will be created in the column.
- Create a new workflow by adding
.github/workflows/backlog-automation.yml
to your project. - Create a project with Columns set up in your repository or organisation.
- In the
backlog-automation.yml
you have to decide what events and actions are going move an issue or pull request to a column.
For example:
To move opened issues into the Triage column and assigned pull requests into the To Do column of the Backlog project. You would add the following to the backlog-automation.yml
file:
name: Automate project columns
on: [issues, pull_request]
jobs:
automate-project-columns:
runs-on: ubuntu-latest
steps:
- name: Move new issues into Triage
if: github.event_name == 'issues' && github.event.action == 'opened'
uses: alex-page/automate-project-columns@master
with:
project: Backlog
column: Triage
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Move assinged pull requests into To do
if: github.event_name == 'pull_request' && github.event.action == 'assigned'
uses: alex-page/automate-project-columns@master
with:
project: Backlog
column: To do
repo-token: ${{ secrets.GITHUB_TOKEN }}
These are the options recommended to be changed. For more detailed explanation of the workflow file, check out the GitHub documentation.
Setting | Description | Values |
---|---|---|
on |
When the automation is ran | [issues, pull_request] |
github.event.name |
The event type | issues or pull_request |
github.event.action |
The webhook event that triggers the automation | opened , assigned , ...more |
project |
The name of the project | Backlog |
column |
The column to create or move the card to | Triage |
- v0.0.1 - Update icon and color for GitHub actions
- v0.0.0 - Initial release