mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-03-06 23:18:37 -05:00
labeler tweaks (#2617)
This commit is contained in:
31
.github/workflows/pull-request.yml
vendored
31
.github/workflows/pull-request.yml
vendored
@@ -56,34 +56,3 @@ jobs:
|
||||
}
|
||||
exit_on_result "build_and_detekt" "${{ needs.build_and_detekt.result }}"
|
||||
exit_on_result "androidTest" "${{ needs.androidTest.result }}"
|
||||
|
||||
labeler:
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- id: label-the-PR
|
||||
uses: actions/labeler@v5
|
||||
continue-on-error: true
|
||||
|
||||
check-label:
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
[
|
||||
check-workflow-status,
|
||||
labeler
|
||||
]
|
||||
if: always()
|
||||
steps:
|
||||
- name: Check for PR labels
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const labels = context.payload.pull_request.labels.map(label => label.name);
|
||||
const requiredLabels = ['bugfix', 'enhancement', 'automation', 'dependencies', 'repo', 'release'];
|
||||
const hasRequiredLabel = labels.some(label => requiredLabels.includes(label));
|
||||
console.log(labels);
|
||||
if (!hasRequiredLabel) {
|
||||
core.setFailed(`PR must have at least one of the following labels before it can be merged: ${requiredLabels.join(', ')}.`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user