[infra] Enforce type labels on PRs #275
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new GitHub Actions workflow and a supporting script to ensure that pull requests have appropriate type labels. The most important changes include the creation of the workflow file and the implementation of the script to check for type labels.
New workflow for checking PR type labels:
.github/workflows/prs_check-if-pr-has-type-label.yml
: Added a new workflow to check if pull requests have appropriate type labels. This workflow runs on a PR event and uses theactions/checkout
andactions/github-script
actions to execute the label checking script.Implementation of the label checking script:
.github/workflows/scripts/prs/checkTypeLabel.js
: Added a script that verifies the presence of type labels on pull requests. The script checks for specific labels, creates comments on the PR if the labels are missing or incorrect, and fails the workflow to prevent merging without proper labels.PRs should be labeled according to their purpose.
release
,bug
/regression
andenhancement
/new feature
should be self explanatory.maintenance
is meant to categorize refactors, cleanups and structural changes.dependencies
is similar, but not quite the same. We could potentially combine the two into one.