mirror of
https://github.com/logos-storage/logos-storage-pm.git
synced 2026-01-03 22:13:12 +00:00
31 lines
904 B
YAML
31 lines
904 B
YAML
name: Add Label to Issues
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
add-label:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Add label to open issues in "test1" repository
|
|
run: |
|
|
REPO="TheBasedmint/test1"
|
|
LABEL="Marketplace"
|
|
|
|
# Fetch open issues
|
|
for issue in $(curl -s -H "Authorization: Bearer ${{ secrets.SYNC_LABELS2 }}" \
|
|
-H "Accept: application/vnd.github.v3+json" \
|
|
"https://api.github.com/repos/$REPO/issues?state=open" | jq -r '.[].number'); do
|
|
|
|
# Apply label to each open issue
|
|
curl -X POST -H "Authorization: Bearer ${{ secrets.SYNC_LABELS2 }}" \
|
|
-H "Accept: application/vnd.github.v3+json" \
|
|
-d "{\"labels\": [\"$LABEL\"]}" \
|
|
"https://api.github.com/repos/$REPO/issues/$issue/labels"
|
|
done
|