Skip to content

Bump swagger.version from 2.2.47 to 2.2.48 #2900

Bump swagger.version from 2.2.47 to 2.2.48

Bump swagger.version from 2.2.47 to 2.2.48 #2900

name: Pull Request Auditor
on:
pull_request:
types:
- opened
- labeled
- unlabeled
- edited
- synchronize
- ready_for_review
permissions:
contents: read
jobs:
Label-Auditor:
name: Label Auditor
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1
with:
script: |
const categoriesRequiringSemanticVersion = ['feat', 'bug'];
const requiredCategories = ['feat', 'bug', 'doc', 'test', 'dependencies', 'meta', 'security', 'preview'];
const semanticVersions = ['MAJOR', 'MINOR', 'PATCH'];
const labels = context.payload.pull_request.labels;
if (labels.filter(label => requiredCategories.includes(label.name)).length == 0) {
throw new Error(`Pull Request requires one of the following labels: ${requiredCategories.join(', ')}`);
}
if (labels.filter(label => categoriesRequiringSemanticVersion.includes(label.name)).length > 0) {
if (labels.filter(label => semanticVersions.includes(label.name)).length == 0) {
throw new Error(`Pull Request requires a 'Semantic version'-label for the following labels: ${categoriesRequiringSemanticVersion.join(', ')}`);
}
}