2023-11-05 21:35:53 +02:00
|
|
|
name: Get issue/pull request labels
|
|
|
|
description: Get the current labels of an issue or pull request through the GitHub API
|
|
|
|
|
|
|
|
inputs:
|
|
|
|
issue_number:
|
|
|
|
description: Issue or pull request number to get labels from
|
|
|
|
required: true
|
2024-03-31 17:40:27 +02:00
|
|
|
github-token:
|
|
|
|
description: GitHub token used to authenticate with the GitHub API
|
2024-04-01 07:03:01 +02:00
|
|
|
required: true
|
2023-11-05 21:35:53 +02:00
|
|
|
outputs:
|
|
|
|
labels:
|
|
|
|
description: Labels of the issue or pull request
|
|
|
|
value: ${{ steps.get-labels.outputs.labels }}
|
|
|
|
|
|
|
|
runs:
|
|
|
|
using: composite
|
|
|
|
steps:
|
|
|
|
- id: get-labels
|
|
|
|
shell: sh
|
2024-03-31 17:40:27 +02:00
|
|
|
env:
|
|
|
|
GH_TOKEN: ${{ inputs.github-token }}
|
2023-11-05 21:35:53 +02:00
|
|
|
run: |
|
2023-11-12 23:12:59 +02:00
|
|
|
labels="$(gh api 'repos/simple-icons/simple-icons/issues/${{ inputs.issue_number }}' --jq '.labels.[].name' | tr '\n' ',')"
|
2023-11-05 21:35:53 +02:00
|
|
|
echo "labels=$labels" >> $GITHUB_OUTPUT
|