Skip to content

Conversation

@alcaeus
Copy link
Member

@alcaeus alcaeus commented Jul 30, 2025

GODRIVER-3564

Targeting release/1.17 so the changes apply to future patch releases.

Summary

Adds labeler and label-checker to ensure pull requests get the necessary labels to be used for release notes.

Labels

The labeler action automatically assign labels to pull requests. This was previously done through Evergreen, but using GitHub Actions makes more sense so we don't need to duplicate its code.
While working on this, I also noticed that we still use Evergreen to assign PR reviewers. Since reviewers are automatically assigned through branch rules, this task was not actually doing anything and has been removed.
The new label checker workflow checks for certain label requirements. It requires that one of the following labels is used:

  • bug for bug fixes
  • feature for new features
  • enhancement for smaller improvements
  • documentation for docs changes
  • dependencies for dependency updates (used by dependabot)
    In addition, the breaking tag can be used to denote that a pull request contains breaking changes. This should always be combined with either bug or feature.

For the time being, the label checker won't be required; once we're confident it works this will be added as a required check, meaning that pull requests not containing one of the above labels can't be merged.

Release Notes

The release notes configuration defines the following categories:

  • ⚠️ Breaking Changes: this section contains everything using the breaking label and should only be used for major versions
  • ✨ New Features: the enhancement and feature labels feed this category.
  • 🐛 Fixed: anything labeled bug
  • 📦 Dependency Updates: anything labeled dependencies.
  • 📝 Other Changes: anything else; this list will match anything that didn't already fall into another category, e.g. pull requests only tagged with documentation

To clean up the release notes, the configuration excludes all pull requests created by the PR bot; this removes all "Merge branch into " entries we'd otherwise get. The ignore-for-release label can be used to specifically exclude a pull request from the changelog even if it would fall into other categories. To make sure we only report relevant dependency updates, the github_actions and submodules labels are also excluded. These are used by dependabot in combination with the dependencies label. Since it's impossible to configure a release note category that only takes in pull requests that have two or more labels (e.g. dependencies and go), we have to exclude all submodule and GitHub actions dependencies from the release notes. Since these dependencies are only for development, it's fine to exclude them completely.

@mongodb-drivers-pr-bot
Copy link
Contributor

API Change Report

No changes found!

@alcaeus alcaeus added the review-priority-low Low Priority PR for Review: within 3 business days label Jul 30, 2025
Copy link
Collaborator

@matthewdale matthewdale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! 👍

script: |
${PREPARE_SHELL}
export CONFIG=$PROJECT_DIRECTORY/.github/labeler.yml
export SCRIPT="$DRIVERS_TOOLS/.evergreen/github_app/apply-labels.sh"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional: You can also remove the apply-labels.sh script.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't quite sure if those tools were still used by another driver. I'll confirm with @blink1073 and will remove from DET if possible.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK the go driver was the only one using the script

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I didn't notice it was in a different repo! Yeah, checking with all the drivers is a lot more work. Maybe make a DRIVERS ticket to clean up unused scripts?

script: |
${PREPARE_SHELL}
export CONFIG=$PROJECT_DIRECTORY/.github/reviewers.txt
export SCRIPT="$DRIVERS_TOOLS/.evergreen/github_app/assign-reviewer.sh"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional: You can also remove the assign-reviewer.sh script.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above. I didn't realize this script is in drivers-evergreen-tools.

@alcaeus alcaeus enabled auto-merge (squash) July 31, 2025 10:27
@matthewdale
Copy link
Collaborator

The pre-commit checks are fixed by #2151.

@alcaeus alcaeus force-pushed the release-note-config branch from e85205a to 200587c Compare August 1, 2025 08:52
@alcaeus alcaeus merged commit d406474 into release/1.17 Aug 1, 2025
7 of 8 checks passed
@alcaeus alcaeus deleted the release-note-config branch August 1, 2025 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement ignore-for-release review-priority-low Low Priority PR for Review: within 3 business days

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants