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

Get labels at runtime in assign-to-project workflow (#6612)

This commit is contained in:
Álvaro Mondéjar 2021-09-27 20:03:19 +02:00 committed by GitHub
parent 40108ff5cb
commit 9292184b91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,16 +18,22 @@ jobs:
env:
MY_GITHUB_TOKEN: ${{ secrets.AUTO_ASSIGN_WORKFLOW_TOKEN }}
steps:
- id: get-labels
name: Get labels
run: |
labels="$(curl --retry 5 -s https://api.github.com/repos/simple-icons/simple-icons/pulls/${{ github.event.pull_request.number }} | jq '.labels[].name' | tr '\n' ',' | sed 's/"//g' | sed 's/,$//')"
echo "::set-output name=labels::$labels"
- name: Assign pull requests to "Unprioritised"
uses: srggrs/assign-one-project-github-action@1.2.1
if: contains(github.event.pull_request.labels.*.name, 'icon outdated') == false
if: contains(steps.get-labels.outputs.labels, 'icon outdated') == false
with:
project: https://github.com/orgs/simple-icons/projects/2
column_name: Unprioritised
- name: Assign `icon outdated` pull requests to "Priority 1"
uses: srggrs/assign-one-project-github-action@1.2.1
if: contains(github.event.pull_request.labels.*.name, 'icon outdated')
if: contains(steps.get-labels.outputs.labels, 'icon outdated')
with:
project: https://github.com/orgs/simple-icons/projects/2
column_name: Priority 1