mirror of
https://github.com/Mibew/simple-icons.git
synced 2024-11-16 18:34:12 +03:00
40 lines
1.3 KiB
YAML
40 lines
1.3 KiB
YAML
name: Add Pull Request Labels and Assign to Project
|
|
on:
|
|
pull_request_target:
|
|
types: [opened]
|
|
|
|
jobs:
|
|
triage:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: ericcornelissen/labeler@label-based-on-status
|
|
with:
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
assign-to-project:
|
|
runs-on: ubuntu-latest
|
|
name: Assign to Project
|
|
needs: triage
|
|
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(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(steps.get-labels.outputs.labels, 'icon outdated')
|
|
with:
|
|
project: https://github.com/orgs/simple-icons/projects/2
|
|
column_name: Priority 1
|