Skip to content

merged conflicts

merged conflicts #8

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