
GitHub Actions で gh label create コマンドを使って GitHub リポジトリにラベルを追加するサンプル❗️
青背景で hello という名前のラベルを追加する \( 'ω')/
name: Create label on: push: branches: - main permissions: contents: read issues: write jobs: add-label: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Create label env: GH_TOKEN: ${{ github.token }} run: gh label create hello --color 0066FF --force
ちなみに最初に実装したときに HTTP 403: Resource not accessible by integration というエラーが出て「なんだろ〜」と思ったけど,issues: write アクセス許可を追加したら解決した👌