From fcbdcfdfaaba6862fc0be339cfadd9dd31dcb5ce Mon Sep 17 00:00:00 2001 From: Sophie Wigmore Date: Thu, 28 Oct 2021 11:02:29 -0400 Subject: [PATCH] add pr labeling workflows to packit (#239) --- .github/.patch_files | 15 +++++++++++++++ .github/workflows/check-pr-labels.yml | 24 ++++++++++++++++++++++++ .github/workflows/label-pr.yml | 17 +++++++++++++++++ 3 files changed, 56 insertions(+) create mode 100644 .github/.patch_files create mode 100644 .github/workflows/check-pr-labels.yml create mode 100644 .github/workflows/label-pr.yml diff --git a/.github/.patch_files b/.github/.patch_files new file mode 100644 index 00000000..cf0b1787 --- /dev/null +++ b/.github/.patch_files @@ -0,0 +1,15 @@ +.github/.patch_files +.github/.syncignore +.github/CODEOWNERS +.github/dependabot.yml +.github/labels.yml +.github/workflows/check-pr-labels.yml +.github/workflows/codeql-analysis.yml +.github/workflows/label-pr.yml +.github/workflows/lint.yml +.github/workflows/synchronize-labels.yml +.github/workflows/test-pull-request.yml +.gitignore +LICENSE +NOTICE +README.md diff --git a/.github/workflows/check-pr-labels.yml b/.github/workflows/check-pr-labels.yml new file mode 100644 index 00000000..c4f10eb1 --- /dev/null +++ b/.github/workflows/check-pr-labels.yml @@ -0,0 +1,24 @@ +name: Validate PR Labels +on: + pull_request: + branches: + - main + types: + - synchronize + - opened + - reopened + - labeled + - unlabeled + +concurrency: pr_labels + +jobs: + semver: + name: Ensure Minimal Semver Labels + runs-on: ubuntu-latest + steps: + - uses: mheap/github-action-required-labels@v1 + with: + count: 1 + labels: semver:major, semver:minor, semver:patch + mode: exactly diff --git a/.github/workflows/label-pr.yml b/.github/workflows/label-pr.yml new file mode 100644 index 00000000..a1767af1 --- /dev/null +++ b/.github/workflows/label-pr.yml @@ -0,0 +1,17 @@ +name: Auto-label PR +on: + pull_request: + branches: + - main + +concurrency: pr_labels + +jobs: + semver-label: + name: Semver Auto-Label + runs-on: ubuntu-latest + steps: + - name: Auto-label Semver + uses: paketo-buildpacks/github-config/actions/pull-request/auto-semver-label@main + env: + GITHUB_TOKEN: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}