feat: add automatic AB# tagging from branch name#152
feat: add automatic AB# tagging from branch name#152joshjohanning wants to merge 4 commits intomainfrom
Conversation
Add new `add-ab-tag-from-branch` input that extracts work item IDs from the head branch name and appends AB#xxx to the PR body if not already present. Supports common branch formats like task/12345/description, task-12345, 12345-description, and more. closes #151
There was a problem hiding this comment.
Pull request overview
This PR implements a new add-ab-tag-from-branch input that automatically extracts Azure DevOps work item IDs from the head branch name and appends the corresponding AB#xxx tags to the PR body if not already present. This addresses feature request #151 from users who want branch names like task/12345/fix-bug to automatically populate the PR body with AB#12345.
Changes:
- New
add-work-item-from-branchinput and its extraction/update logic (extractWorkItemIdsFromBranch,addWorkItemsToPRBodyfunctions) - Comprehensive test suite covering happy path, duplicate prevention, empty body, multiple IDs, and disabled scenarios
- Documentation updates (README, action.yml) and version bump to 3.3.0
Reviewed changes
Copilot reviewed 5 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/index.js |
Core implementation: new regex pattern, extractWorkItemIdsFromBranch export, addWorkItemsToPRBody async function, and wiring into run() |
__tests__/index.test.js |
Unit tests for extractWorkItemIdsFromBranch and integration tests for Add AB# tag from branch scenarios |
action.yml |
New add-work-item-from-branch input declaration |
README.md |
New feature listed in Key Features, new row in the Inputs table |
package.json / package-lock.json |
Minor version bump to 3.3.0 |
badges/coverage.svg |
Updated coverage badge from 85.12% to 86.26% |
You can also share your feedback on Copilot code review. Take the survey.
…fy usage with check-pull-request
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 7 changed files in this pull request and generated 3 comments.
You can also share your feedback on Copilot code review. Take the survey.
… digit IDs and update related documentation
Add new
add-work-item-from-branchinput that extracts work item IDs from the head branch name and appends AB#xxx to the PR body if not already present. Supports common branch formats like task/12345/description, task-12345, 12345-description, and more.Only matches 3+ digits to avoid versioning conflicts / false positive links
closes #151