Skip to content

Add new issues to Ignite GH Project #2

Add new issues to Ignite GH Project

Add new issues to Ignite GH Project #2

name: Add new issues to Ignite GH Project
on:
issues:
types:
- opened
jobs:
add-to-project:
name: Add issue to project
runs-on: ubuntu-latest
permissions: {}
steps:
- uses: actions/[email protected]
with:
project-url: ${{ secrets.GH_PROJECT_URL }}
github-token: ${{ secrets.ADD_TO_PROJECT }}
label_issues:
needs: add-to-project
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- run: |
if [ -n "$LABELS" ]; then
gh issue edit "$NUMBER" --add-label "$LABELS"
else
echo "No label to add."
fi
env:
GH_TOKEN: ${{ secrets.ADD_TO_PROJECT }}
GH_REPO: ${{ github.repository }}
NUMBER: ${{ github.event.issue.number }}
LABELS: ${{ secrets.ISSUE_LABEL }}