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

Closed
opened 2026-04-26 15:30:25 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/6157
Author: @vvolkgang
Created: 11/11/2025
Status: Merged
Merged: 11/17/2025
Merged by: @vvolkgang

Base: mainHead: vvolkgang/label-prs


📝 Commits (10+)

  • c79e985 Remove unused .husky folder
  • 1e58893 Label PR script and workflow - first draft
  • d204171 invert loops
  • 125a2f6 Add catch-all label
  • d3a3285 Re-inverted loops, it's less verbose
  • 025a994 Implement PR Title labeling
  • 8cfa32d Check for conventional commit format
  • dbccb55 Add script docs and cleanup
  • 18a4838 Implement argparse, refactor arguments and add dry-run option
  • 104d510 Workflow - Add workflow_dispatch. Removing pull_request for now ahead of testing

📊 Changes

4 files changed (+367 additions, -1 deletions)

View changed files

.github/label-pr.json (+49 -0)
.github/scripts/label-pr.py (+238 -0)
.github/workflows/sdlc-label-pr.yml (+80 -0)
.husky/pre-commit (+0 -1)

📄 Description

🎟️ 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

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/bitwarden/android/pull/6157 **Author:** [@vvolkgang](https://github.com/vvolkgang) **Created:** 11/11/2025 **Status:** ✅ Merged **Merged:** 11/17/2025 **Merged by:** [@vvolkgang](https://github.com/vvolkgang) **Base:** `main` ← **Head:** `vvolkgang/label-prs` --- ### 📝 Commits (10+) - [`c79e985`](https://github.com/bitwarden/android/commit/c79e9850a2fe14981a8a9e1633de1358087a5e20) Remove unused .husky folder - [`1e58893`](https://github.com/bitwarden/android/commit/1e5889395839e0431f2dd1f2197434015fa7ebbc) Label PR script and workflow - first draft - [`d204171`](https://github.com/bitwarden/android/commit/d204171604d4cbc85114d2c6bb70e3edec717562) invert loops - [`125a2f6`](https://github.com/bitwarden/android/commit/125a2f690b986d74b8bd3068cb485a9a67bdf88b) Add catch-all label - [`d3a3285`](https://github.com/bitwarden/android/commit/d3a3285252c6cdb3d1a58216aadfbee43edfab50) Re-inverted loops, it's less verbose - [`025a994`](https://github.com/bitwarden/android/commit/025a9948aeb17d4503ce066b536ddc25de74d892) Implement PR Title labeling - [`8cfa32d`](https://github.com/bitwarden/android/commit/8cfa32d2ebc66073c822a34a3a80c96ce1339ee5) Check for conventional commit format - [`dbccb55`](https://github.com/bitwarden/android/commit/dbccb55fe6f1d2ef36b6e57e442d5fbfac200abc) Add script docs and cleanup - [`18a4838`](https://github.com/bitwarden/android/commit/18a4838b92685367329c3bbe291b9469811cc0b1) Implement argparse, refactor arguments and add dry-run option - [`104d510`](https://github.com/bitwarden/android/commit/104d510162867ad9d2f760dcdf301665182935c1) Workflow - Add workflow_dispatch. Removing pull_request for now ahead of testing ### 📊 Changes **4 files changed** (+367 additions, -1 deletions) <details> <summary>View changed files</summary> ➕ `.github/label-pr.json` (+49 -0) ➕ `.github/scripts/label-pr.py` (+238 -0) ➕ `.github/workflows/sdlc-label-pr.yml` (+80 -0) ➖ `.husky/pre-commit` (+0 -1) </details> ### 📄 Description ## 🎟️ 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 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-26 15:30:25 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#47968