Skip to content

Bump okhttp.version from 4.12.0 to 5.2.1 #1330

Bump okhttp.version from 4.12.0 to 5.2.1

Bump okhttp.version from 4.12.0 to 5.2.1 #1330

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@v6
with:
script: |
const categoriesRequiringSemanticVersion = ['feat', 'bug'];
const requiredCategories = ['feat', 'bug', 'doc', 'test', 'dependencies', 'meta'];
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(', ')}`);
}
}