[PR #6157] [PM-14880] ci: Add automated PR labelling based on file paths and title patterns #6366

Closed
opened 2025-11-27 00:22:49 -06:00 by GiteaMirror · 0 comments
Owner

Original Pull Request: https://github.com/bitwarden/android/pull/6157

State: closed
Merged: Yes


🎟️ Tracking

PM-14880

📔 Objective

Automate pull request labelling based on changed file paths and PR title patterns following conventional commits format, as a first step towards release notes with automated categories !

  • JSON configuration: Label patterns defined in .github/label-pr.json - planned using yaml initially but it would require an external dependency, introducing the need for python environment and dependency management. Python supports json deserialization out of the box. File based config will allow us to centralise these scripts in our gh-actions repo later down the line.
  • Labeling modes (add or replace) - In order to keep labels up-to-date in our PRs we'll replace them when they're updated, with the exception of Community PRs and our automated PRs where we'll add instead, preserving labels set by other automations.
  • Raw python script without additional dependencies - faster workflows and easier local testing.

Note

  • pull_request workflow target will be added in a future PR after testing with workflow_dispatch.
  • Catch-all label set as t:misc after much deliberation, due to (1) conciseness and (2) it's just a fallback for unhandled exceptions which we should monitor and address, not expecting us to use it much.

Labels

App Labels (from file paths):

  • app:password-manager - Password manager app changes
  • app:authenticator - Authenticator app changes

Change Type Labels:

  • t:new-feature - New product features
  • t:enhancement - Existing product feature enhancements
  • t:bug - Bug fixes
  • t:tech-debt - Technical debt, refactoring, cleanup
  • t:docs - Documentation changes
  • t:ci - CI/CD changes
  • t:deps - Dependency updates
  • t:breaking-change - Breaking changes
  • t:misc - Miscellaneous (catch-all)

Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes
**Original Pull Request:** https://github.com/bitwarden/android/pull/6157 **State:** closed **Merged:** Yes --- ## 🎟️ Tracking PM-14880 ## 📔 Objective Automate pull request labelling based on changed file paths and PR title patterns following conventional commits format, as a first step towards release notes with automated ✨ _categories_ ✨ ! * JSON configuration: Label patterns defined in `.github/label-pr.json` - planned using yaml initially but it would require an external dependency, introducing the need for python environment and dependency management. Python supports json deserialization out of the box. File based config will allow us to centralise these scripts in our gh-actions repo later down the line. * Labeling modes (add or replace) - In order to keep labels up-to-date in our PRs we'll replace them when they're updated, with the exception of Community PRs and our automated PRs where we'll add instead, preserving labels set by other automations. * Raw python script without additional dependencies - faster workflows and easier local testing. > [!NOTE] > * `pull_request` workflow target will be added in a future PR after testing with `workflow_dispatch`. > * Catch-all label set as `t:misc` after much deliberation, due to (1) conciseness and (2) it's just a fallback for unhandled exceptions which we should monitor and address, not expecting us to use it much. ### Labels **App Labels (from file paths):** - `app:password-manager` - Password manager app changes - `app:authenticator` - Authenticator app changes **Change Type Labels:** - `t:new-feature` - New product features - `t:enhancement` - Existing product feature enhancements - `t:bug` - Bug fixes - `t:tech-debt` - Technical debt, refactoring, cleanup - `t:docs` - Documentation changes - `t:ci` - CI/CD changes - `t:deps` - Dependency updates - `t:breaking-change` - Breaking changes - `t:misc` - Miscellaneous (catch-all) ## ⏰ Reminders before review - Contributor guidelines followed - All formatters and local linters executed and passed - Written new unit and / or integration tests where applicable - Protected functional changes with optionality (feature flags) - Used internationalization (i18n) for all UI strings - CI builds passed - Communicated to DevOps any deployment requirements - Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team ## 🦮 Reviewer guidelines <!-- Suggested interactions but feel free to use (or not) as you desire! --> - 👍 (`:+1:`) or similar for great changes - 📝 (`:memo:`) or ℹ️ (`:information_source:`) for notes or general info - ❓ (`:question:`) for questions - 🤔 (`:thinking:`) or 💭 (`:thought_balloon:`) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion - 🎨 (`:art:`) for suggestions / improvements - ❌ (`:x:`) or ⚠️ (`:warning:`) for more significant problems or concerns needing attention - 🌱 (`:seedling:`) or ♻️ (`:recycle:`) for future improvements or indications of technical debt - ⛏ (`:pick:`) for minor or nitpick changes
GiteaMirror added the pull-request label 2025-11-27 00:22:49 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#6366