Skip to content

Instantly share code, notes, and snippets.

@bellons91
Created April 28, 2022 08:50
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save bellons91/df04f32c77c43d9222f26bb32b6a0d3a to your computer and use it in GitHub Desktop.
This GitHub Action automatically assigns a task or a PR to the related Project given its Labels
name: Auto Assign to Project(s)
on:
issues:
types: [opened, labeled]
pull_request:
types: [opened, labeled]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
assign_one_project:
runs-on: ubuntu-latest
name: Assign to One Project
steps:
- name: Assign issues with `Article` label to project Articles (id:4)
uses: srggrs/assign-one-project-github-action@1.2.1
if: |
contains(github.event.issue.labels.*.name, 'Article')
with:
project: 'https://github.com/code4it-dev/c4it-blog/projects/4'
- name: Assign issues with `Tip` label to project Tips (id:2)
uses: srggrs/assign-one-project-github-action@1.2.1
if: |
contains(github.event.issue.labels.*.name, 'Tip')
with:
project: 'https://github.com/code4it-dev/c4it-blog/projects/2'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment