1
0
mirror of https://github.com/simple-icons/simple-icons.git synced 2024-12-16 01:10:30 +02:00

Fix project auto-assignment closing not merged PRs (#7128)

* Fix project assignment on closed PRs not merged

* Minor change

* Don't execute labeler on closed PRs

* Fix column name
This commit is contained in:
Álvaro Mondéjar 2022-02-07 10:24:48 +01:00 committed by GitHub
parent a89f126550
commit 6eee268a48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,11 +1,12 @@
name: Add Pull Request Labels and Assign to Project
on:
pull_request_target:
types: [opened]
types: [opened, closed]
jobs:
triage:
runs-on: ubuntu-latest
if: github.event.action == 'opened'
steps:
- uses: ericcornelissen/labeler@label-based-on-status
with:
@ -14,6 +15,7 @@ jobs:
assign-to-project:
runs-on: ubuntu-latest
name: Assign to Project
if: github.event.action == 'opened'
needs: triage
env:
MY_GITHUB_TOKEN: ${{ secrets.AUTO_ASSIGN_WORKFLOW_TOKEN }}
@ -76,3 +78,19 @@ jobs:
with:
project: https://github.com/orgs/simple-icons/projects/2
column_name: Unprioritised
unassign-from-project:
runs-on: ubuntu-latest
name: Unassign from Project
if: |
github.event.action != 'opened' &&
github.event.pull_request.merged == false
needs: triage
env:
MY_GITHUB_TOKEN: ${{ secrets.AUTO_ASSIGN_WORKFLOW_TOKEN }}
steps:
- name: Assign closed pull requests to "Completed or Abandoned"
uses: srggrs/assign-one-project-github-action@1.3.1
with:
project: https://github.com/orgs/simple-icons/projects/2
column_name: Completed or Abandoned