Workflows use checkout step for label apply - Checkout might be needed/useful, otherwise config files are not present - Do not remove labels from PR updates anymore. Has to be done manually. Otherwise manual labelling really isn't possible.
| @@ -13,6 +13,11 @@ jobs: | |||
| 13 | runs-on: ubuntu-latest | 13 | runs-on: ubuntu-latest |
| 14 | 14 | ||
| 15 | steps: | 15 | steps: |
| 16 | - name: Checkout Repository | ||
| 17 | # Checkout | ||
| 18 | # https://github.com/marketplace/actions/checkout | ||
| 19 | uses: actions/checkout@v4 | ||
| 20 | |||
| 16 | - name: Auto-Label Issues (Based on Issue Content) | 21 | - name: Auto-Label Issues (Based on Issue Content) |
| 17 | # only auto label based on issue content once, on open (to prevent re-labeling removed labels) | 22 | # only auto label based on issue content once, on open (to prevent re-labeling removed labels) |
| 18 | if: github.event.action == 'opened' | 23 | if: github.event.action == 'opened' |
| @@ -40,13 +40,17 @@ jobs: | |||
| 40 | if: github.event.action == 'opened' || (github.event.action == 'synchronize' && (github.event.changes.base || github.event.changes.head)) | 40 | if: github.event.action == 'opened' || (github.event.action == 'synchronize' && (github.event.changes.base || github.event.changes.head)) |
| 41 | 41 | ||
| 42 | steps: | 42 | steps: |
| 43 | - name: Checkout Repository | ||
| 44 | # Checkout | ||
| 45 | # https://github.com/marketplace/actions/checkout | ||
| 46 | uses: actions/checkout@v4 | ||
| 47 | |||
| 43 | - name: Apply Labels Based on Branch Name and Target Branch | 48 | - name: Apply Labels Based on Branch Name and Target Branch |
| 44 | # Pull Request Labeler | 49 | # Pull Request Labeler |
| 45 | # https://github.com/marketplace/actions/labeler | 50 | # https://github.com/marketplace/actions/labeler |
| 46 | uses: actions/labeler@v5 | 51 | uses: actions/labeler@v5 |
| 47 | with: | 52 | with: |
| 48 | configuration-path: .github/pr-auto-labels-by-branch.yml | 53 | configuration-path: .github/pr-auto-labels-by-branch.yml |
| 49 | sync-labels: true # Remove labels when they are not relevant anymore | ||
| 50 | repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} | 54 | repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} |
| 51 | 55 | ||
| 52 | label-by-files: | 56 | label-by-files: |
| @@ -54,13 +58,17 @@ jobs: | |||
| 54 | runs-on: ubuntu-latest | 58 | runs-on: ubuntu-latest |
| 55 | 59 | ||
| 56 | steps: | 60 | steps: |
| 61 | - name: Checkout Repository | ||
| 62 | # Checkout | ||
| 63 | # https://github.com/marketplace/actions/checkout | ||
| 64 | uses: actions/checkout@v4 | ||
| 65 | |||
| 57 | - name: Apply Labels Based on Changed Files | 66 | - name: Apply Labels Based on Changed Files |
| 58 | # Pull Request Labeler | 67 | # Pull Request Labeler |
| 59 | # https://github.com/marketplace/actions/labeler | 68 | # https://github.com/marketplace/actions/labeler |
| 60 | uses: actions/labeler@v5 | 69 | uses: actions/labeler@v5 |
| 61 | with: | 70 | with: |
| 62 | configuration-path: .github/pr-auto-labels-by-files.yml | 71 | configuration-path: .github/pr-auto-labels-by-files.yml |
| 63 | sync-labels: true # Remove labels when they are not relevant anymore | ||
| 64 | repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} | 72 | repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} |
| 65 | 73 | ||
| 66 | remove-stale-label: | 74 | remove-stale-label: |