| 196 | 196 | configuration-path: .github/pr-auto-labels-by-files.yml |
| 197 | 197 | repo-token: ${{ steps.app.outputs.token }} |
| 198 | 198 | |
| 199 | + label-copilot-prs: |
| 200 | + name: 🏷️ Label Copilot PRs as Vibe Coded |
| 201 | + runs-on: ubuntu-latest |
| 202 | + # Only label once when PR is created by Copilot |
| 203 | + if: > |
| 204 | + github.event.action == 'opened' && |
| 205 | + github.event.pull_request.user.login == 'Copilot' |
| 206 | + |
| 207 | + steps: |
| 208 | + - name: Mint App Token |
| 209 | + id: app |
| 210 | + # Create a GitHub App token |
| 211 | + # https://github.com/marketplace/actions/create-github-app-token |
| 212 | + uses: actions/create-github-app-token@v2 |
| 213 | + with: |
| 214 | + app-id: ${{ vars.ST_BOT_APP_ID }} |
| 215 | + private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }} |
| 216 | + owner: ${{ github.repository_owner }} |
| 217 | + |
| 218 | + - name: Add Vibe Coded Label |
| 219 | + # 🤖 Issues Helper |
| 220 | + # https://github.com/marketplace/actions/issues-helper |
| 221 | + uses: actions-cool/issues-helper@v3.6.0 |
| 222 | + with: |
| 223 | + actions: 'add-labels' |
| 224 | + token: ${{ steps.app.outputs.token }} |
| 225 | + issue-number: ${{ github.event.pull_request.number }} |
| 226 | + labels: '✨ Vibe Coded' |
| 227 | + |
| 199 | 228 | remove-stale-label: |
| 200 | 229 | name: 🗑️ Remove Stale Label on Comment |
| 201 | 230 | needs: [label-by-branches, label-by-files, label-copilot-prs] |
| 202 | 231 | runs-on: ubuntu-latest |
| 203 | 232 | # Only runs on comments not done by the github actions bot |
| 204 | 233 | if: always() && (github.event_name == 'pull_request_review_comment' && github.event.sender.type != 'Bot') |