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:
parent
40108ff5cb
commit
9292184b91
10
.github/workflows/add-labels-priority.yml
vendored
10
.github/workflows/add-labels-priority.yml
vendored
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user