| name: π οΈ Issues Manager |
|
|
| on: |
| issues: |
| types: [opened, edited, labeled, unlabeled] |
| |
| issue_comment: |
| types: [created] |
|
|
| permissions: |
| contents: read |
| issues: write |
|
|
| jobs: |
| label-on-content: |
| name: π·οΈ Label Issues by Content |
| runs-on: ubuntu-latest |
| if: always() |
|
|
| steps: |
| - name: Mint App Token |
| id: app |
| |
| |
| uses: actions/create-github-app-token@v2 |
| with: |
| app-id: ${{ vars.ST_BOT_APP_ID }} |
| private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }} |
| owner: ${{ github.repository_owner }} |
|
|
| - name: Checkout Repository |
| |
| |
| uses: actions/checkout@v4.2.2 |
|
|
| - name: Auto-Label Issues (Based on Issue Content) |
| |
| if: github.event.action == 'opened' |
|
|
| |
| |
| uses: github/issue-labeler@v3.4 |
| with: |
| configuration-path: .github/issues-auto-labels.yml |
| enable-versioned-regex: 0 |
| repo-token: ${{ steps.app.outputs.token }} |
|
|
| label-on-labels: |
| name: π·οΈ Label Issues by Labels |
| needs: [label-on-content] |
| runs-on: ubuntu-latest |
| if: always() |
|
|
| steps: |
| - name: Mint App Token |
| id: app |
| |
| |
| uses: actions/create-github-app-token@v2 |
| with: |
| app-id: ${{ vars.ST_BOT_APP_ID }} |
| private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }} |
| owner: ${{ github.repository_owner }} |
|
|
| - name: β
Add "π Approved" for relevant labels |
| if: contains(fromJSON('["π©βπ» Good First Issue", "π Help Wanted", "πͺ² Confirmed", "β οΈ High Priority", "β Medium Priority", "π€ Low Priority"]'), github.event.label.name) |
| |
| |
| uses: actions-cool/issues-helper@v3.6.0 |
| with: |
| actions: 'add-labels' |
| token: ${{ steps.app.outputs.token }} |
| labels: 'π Approved' |
|
|
| - name: β Remove progress labels when issue is marked done or stale |
| if: contains(fromJSON('["β
Done", "β
Done (staging)", "β°οΈ Stale", "β wontfix"]'), github.event.label.name) |
| |
| |
| uses: actions-cool/issues-helper@v3.6.0 |
| with: |
| actions: 'remove-labels' |
| token: ${{ steps.app.outputs.token }} |
| labels: 'π§βπ» In Progress,π€ Unsure,π€ Under Consideration' |
|
|
| - name: β Remove temporary labels when confirmed labels are added |
| if: contains(fromJSON('["β wontfix","π Approved","π©βπ» Good First Issue"]'), github.event.label.name) |
| |
| |
| uses: actions-cool/issues-helper@v3.6.0 |
| with: |
| actions: 'remove-labels' |
| token: ${{ steps.app.outputs.token }} |
| labels: 'π€ Unsure,π€ Under Consideration' |
|
|
| - name: β Remove no bug labels when "πͺ² Confirmed" is added |
| if: github.event.label.name == 'πͺ² Confirmed' |
| |
| |
| uses: actions-cool/issues-helper@v3.6.0 |
| with: |
| actions: 'remove-labels' |
| token: ${{ steps.app.outputs.token }} |
| labels: 'βοΈ Not Reproducible,βοΈ Not A Bug' |
|
|
| remove-stale-label: |
| name: ποΈ Remove Stale Label on Comment |
| needs: [label-on-content, label-on-labels] |
| runs-on: ubuntu-latest |
| |
| if: always() && (github.event_name == 'issue_comment' && github.event.sender.type != 'Bot') |
|
|
| steps: |
| - name: Mint App Token |
| id: app |
| |
| |
| uses: actions/create-github-app-token@v2 |
| with: |
| app-id: ${{ vars.ST_BOT_APP_ID }} |
| private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }} |
| owner: ${{ github.repository_owner }} |
|
|
| - name: Remove Stale Label |
| |
| |
| uses: actions-cool/issues-helper@v3.6.0 |
| with: |
| actions: 'remove-labels' |
| token: ${{ steps.app.outputs.token }} |
| issue-number: ${{ github.event.issue.number }} |
| labels: 'β°οΈ Stale,πΈοΈ Inactive,π Awaiting User Response,π No Response' |
|
|
| write-auto-comments: |
| name: π¬ Post Issue Comments Based on Labels |
| needs: [label-on-content, label-on-labels, remove-stale-label] |
| runs-on: ubuntu-latest |
| if: always() |
|
|
| steps: |
| - name: Mint App Token |
| id: app |
| |
| |
| uses: actions/create-github-app-token@v2 |
| with: |
| app-id: ${{ vars.ST_BOT_APP_ID }} |
| private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }} |
| owner: ${{ github.repository_owner }} |
|
|
| - name: Checkout Repository |
| |
| |
| uses: actions/checkout@v4.2.2 |
|
|
| - name: Post Issue Comments Based on Labels |
| |
| |
| uses: peaceiris/actions-label-commenter@v1.10.0 |
| with: |
| config_file: .github/issues-auto-comments.yml |
| github_token: ${{ steps.app.outputs.token }} |
|
|