mirror of
https://github.com/Mibew/simple-icons.git
synced 2025-01-19 16:40:35 +03:00
ee372033ab
* Deduplicate steps in GHA workflows * Minor change
28 lines
812 B
YAML
28 lines
812 B
YAML
# Get the current labels of an issue or pull request through the GitHub API
|
|
name: Get issue/pull request labels
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
issue_number:
|
|
description: Issue or pull request number to get labels from
|
|
required: true
|
|
type: number
|
|
outputs:
|
|
labels:
|
|
description: Labels of the issue or pull request
|
|
value: ${{ jobs.get-labels.outputs.labels }}
|
|
|
|
jobs:
|
|
get-labels:
|
|
name: Get labels
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
labels: ${{ steps.get-labels.outputs.labels }}
|
|
steps:
|
|
- id: get-labels
|
|
name: Get labels using GitHub API
|
|
run: |
|
|
labels="$(gh api 'repos/simple-icons/simple-icons/issues/${{ inputs.issue_number }}' --jq '.labels.[].name')"
|
|
echo "labels=$labels" >> $GITHUB_OUTPUT
|