Skip to content

fix: replace inline AB# modification with linked work items table#155

Merged
joshjohanning merged 9 commits intomainfrom
fix-work-item-title-feature
Mar 10, 2026
Merged

fix: replace inline AB# modification with linked work items table#155
joshjohanning merged 9 commits intomainfrom
fix-work-item-title-feature

Conversation

@joshjohanning
Copy link
Owner

@joshjohanning joshjohanning commented Mar 9, 2026

Summary

Fixes #154 - The append-work-item-title feature was modifying AB# references inline in the PR body, which caused the azure-boards bot to break the Azure DevOps Development section link. This PR replaces the inline approach with a separate "Linked Work Items" table appended to the PR body.

Changes

  • New add-work-item-table input - Adds an H3 "Linked Work Items" table to the bottom of the PR body with work item ID, type, and title
  • Deprecated append-work-item-title - Still works as an alias for add-work-item-table, with a deprecationMessage in action.yml
  • Original AB# references are preserved - The table uses plain work item numbers (no AB# prefix) linked to Azure DevOps URLs, preventing the azure-boards bot from creating duplicate Development entries or triggering edit loops
  • Idempotent - The table section is replaced (not accumulated) on each run
  • README - Updated inputs table, added if: github.actor != 'azure-boards[bot]' to usage example to avoid duplicate workflow runs
  • Version bumped to 3.2.1

How it works

Before (broke Azure DevOps link):

This PR implements AB#123 - Fix login bug

After (table appended, original text untouched):

This PR implements AB#123


Linked Work Items

Work Item Type Title
123 Bug Fix login bug
Image

Testing

  • 81 JS tests + 29 bash tests passing
  • Manually verified: no infinite edit loop, no duplicate Development section entries, original AB# link preserved

Doc Enhancements

  • Suggesting people to conditionally not run the job if the azure boards app is the actor; less build consumption used

The append-work-item-title feature replaced AB# references inline,
which removed the Development section link in Azure DevOps. Instead,
add a "Linked Work Items" table at the bottom of the PR body, keeping
original AB# references intact.

- Replace inline AB# modification with a separate H3 table section
- Add new `add-work-item-table` input, deprecate `append-work-item-title`
- Section is idempotent (replaced on each run, not accumulated)
- Bump version to 3.2.1

Closes #154
Copilot AI review requested due to automatic review settings March 9, 2026 19:18
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Reworks the append-work-item-title behavior to avoid breaking Azure DevOps’ PR “Development” linkage by preserving inline AB# references and appending a separate “Linked Work Items” table section to the PR body instead.

Changes:

  • Introduces add-work-item-table input and treats append-work-item-title as a deprecated alias.
  • Updates PR-body mutation logic to append/replace a dedicated “Linked Work Items” table (idempotent via section markers).
  • Updates tests, documentation, and bumps version to 3.2.1.

Reviewed changes

Copilot reviewed 5 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/index.js Adds new input handling and replaces inline AB# modification with an appended/replaced Linked Work Items table section.
action.yml Deprecates append-work-item-title and adds add-work-item-table input definition.
__tests__/index.test.js Updates/extends Jest coverage for the new table behavior and deprecated alias behavior.
README.md Documents the new input and adds a workflow guard to avoid azure-boards bot-triggered duplicate runs.
package.json Bumps package version to 3.2.1.
package-lock.json Updates lockfile version metadata to 3.2.1.
badges/coverage.svg Updates coverage badge value.

You can also share your feedback on Copilot code review. Take the survey.

@joshjohanning joshjohanning merged commit 500464f into main Mar 10, 2026
4 checks passed
@joshjohanning joshjohanning deleted the fix-work-item-title-feature branch March 10, 2026 01:30
@github-actions
Copy link

📦 Draft Release Created

A draft release v3.2.1 has been created for this PR.

🔗 View Draft Release

Next Steps

  • Review the release notes
  • Publish the release to make it permanent

This is an automated reminder from the publish-github-action workflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AB# Link removed from Development section when using append-work-item-title

2 participants