From be80595e84ba7fcc59ba439f8e0944dc016d242b Mon Sep 17 00:00:00 2001 From: Andreas Braun Date: Wed, 30 Jul 2025 10:29:18 +0200 Subject: [PATCH 1/6] Add workflow to run labeler action --- .github/labeler.yml | 5 ++--- .github/workflows/labeler.yml | 12 ++++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/labeler.yml diff --git a/.github/labeler.yml b/.github/labeler.yml index 58eb1bbd43..ae7a121cc6 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,15 +1,14 @@ - priority-3-low: - changed-files: - any-glob-to-any-file: '*' documentation: - changed-files: - - any-glob-to-any-file: + - any-glob-to-any-file: - docs/** - examples/** dependencies: - changed-files: - - any-glob-to-any-file: + - any-glob-to-any-file: - go.mod diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 0000000000..52474c6a6c --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,12 @@ +name: "Pull Request Labeler" +on: + - pull_request_target + +jobs: + labeler: + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: actions/labeler@v5 From 32c0158fd3997707c956c15a24b3735fcadd7102 Mon Sep 17 00:00:00 2001 From: Andreas Braun Date: Wed, 30 Jul 2025 10:29:25 +0200 Subject: [PATCH 2/6] Add workflow to check labels --- .github/workflows/check-labels.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/check-labels.yml diff --git a/.github/workflows/check-labels.yml b/.github/workflows/check-labels.yml new file mode 100644 index 0000000000..6a1be9c31c --- /dev/null +++ b/.github/workflows/check-labels.yml @@ -0,0 +1,19 @@ +name: Label Checker +on: + pull_request: + types: + - opened + - synchronize + - reopened + - labeled + - unlabeled + +jobs: + check_labels: + name: Check labels + runs-on: ubuntu-latest + steps: + - uses: docker://agilepathway/pull-request-label-checker:latest + with: + one_of: bug,feature,enhancement,documentation,dependencies + repo_token: ${{ secrets.GITHUB_TOKEN }} From d4f8ecb84a8572c780043469068a49814a85ee2f Mon Sep 17 00:00:00 2001 From: Andreas Braun Date: Wed, 30 Jul 2025 10:34:07 +0200 Subject: [PATCH 3/6] Remove labeler and PR reviewer assignment from Evergreen --- .evergreen/config.yml | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 1800457b2b..6820eee952 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -410,32 +410,6 @@ functions: export HEAD_SHA=${github_commit} bash etc/api_report.sh - "add PR labels": - - command: shell.exec - type: test - params: - shell: "bash" - working_dir: src/go.mongodb.org/mongo-driver - add_expansions_to_env: true - script: | - ${PREPARE_SHELL} - export CONFIG=$PROJECT_DIRECTORY/.github/labeler.yml - export SCRIPT="$DRIVERS_TOOLS/.evergreen/github_app/apply-labels.sh" - bash $SCRIPT -l $CONFIG -h ${github_commit} -o "mongodb" -n "mongo-go-driver" - - "add PR reviewer": - - command: shell.exec - type: test - params: - shell: "bash" - working_dir: src/go.mongodb.org/mongo-driver - add_expansions_to_env: true - script: | - ${PREPARE_SHELL} - export CONFIG=$PROJECT_DIRECTORY/.github/reviewers.txt - export SCRIPT="$DRIVERS_TOOLS/.evergreen/github_app/assign-reviewer.sh" - bash $SCRIPT -p $CONFIG -h ${github_commit} -o "mongodb" -n "mongo-go-driver" - "backport pr": - command: subprocess.exec type: test @@ -936,8 +910,6 @@ tasks: allowed_requesters: ["patch", "github_pr"] commands: - func: assume-test-secrets-ec2-role - - func: "add PR reviewer" - - func: "add PR labels" - func: "create-api-report" - name: backport-pr From 6ae0d639e1932a75d0da40bc54cfe504883e5102 Mon Sep 17 00:00:00 2001 From: Andreas Braun Date: Wed, 30 Jul 2025 11:01:16 +0200 Subject: [PATCH 4/6] Add configuration for automated release notes --- .github/release.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/release.yml diff --git a/.github/release.yml b/.github/release.yml new file mode 100644 index 0000000000..34b72a0bdf --- /dev/null +++ b/.github/release.yml @@ -0,0 +1,25 @@ +changelog: + exclude: + labels: + - ignore-for-release + - github_actions + - submodules + authors: + - mongodb-drivers-pr-bot + categories: + - title: ⚠️ Breaking Changes + labels: + - breaking + - title: ✨ New Features + labels: + - enhancement + - feature + - title: 🐛 Fixed + labels: + - bug + - title: 📦 Dependency Updates + labels: + - dependencies + - title: 📝 Other Changes + labels: + - "*" From b4d3ad090319d565cf8cd603a164a2cbcc2f7d5e Mon Sep 17 00:00:00 2001 From: Andreas Braun Date: Wed, 30 Jul 2025 11:18:39 +0200 Subject: [PATCH 5/6] Delete reviewers file --- .github/reviewers.txt | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 .github/reviewers.txt diff --git a/.github/reviewers.txt b/.github/reviewers.txt deleted file mode 100644 index 2230c13423..0000000000 --- a/.github/reviewers.txt +++ /dev/null @@ -1,3 +0,0 @@ -qingyang-hu -matthewdale -prestonvasquez From 200587c82c25c0335402b7f49793be92addba913 Mon Sep 17 00:00:00 2001 From: Andreas Braun Date: Wed, 30 Jul 2025 11:33:38 +0200 Subject: [PATCH 6/6] Add codeowners config for older branches --- .github/CODEOWNERS | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000000..1fad82a6a2 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @mongodb/dbx-go