I want to create a Github workflow that adds newly created issues to a Project (Classic)'s "Todo" column automatically. If any issue comment is created with "[Forward]" keyword, the issue should be moved to "In Progress" column of the same project.
Is there any way to do so using Github actions?
Thanks in advance.
I combined following two solutions and came up with a hybrid one.
- Assign new issues to a project – https://github.com/marketplace/actions/assign-to-one-project
- Trigger workflow based on specific keyword in the comment – https://github.com/orgs/community/discussions/25389
Based on above to solutions, here's my workflow –
name: Auto Assign to Project(s)
on:
issues:
types: [opened]
issue_comment:
types: [created]
env:
GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }}
jobs:
assign_one_project:
runs-on: ubuntu-latest
name: Assign to One Project
steps:
- name: JOB 1
uses: srggrs/assign-one-project-github-action@1.2.1
if: github.event.action == 'opened'
with:
project: 'https://github.com/<project uri>'
column_name: 'Todo'
- name: JOB 2
uses: srggrs/assign-one-project-github-action@1.2.1
if: contains(github.event.comment.body, '[Forward]')
with:
project: 'https://github.com/<project uri>'
column_name: 'In Progress'