Created
April 28, 2022 08:50
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/[email protected] | |
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/[email protected] | |
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