You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: replace inline AB# modification with linked work items table (#155)
* fix: add work item table as separate section to preserve AB# links
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
* fix: deprecate `append-work-item-title` input and update warning message
* test: update test for deprecated append-work-item-title input to use alias
* fix: update work item table to use IDs instead of AB# references to prevent duplicate entries
* docs: skip workflow runs triggered by azure-boards bot to prevent duplicates
* fix(deps): update version to 3.2.1 in package-lock.json
* fix: update work item summary message and sanitize table cell values
* fix: update coverage percentage in SVG badge to reflect current status
* fix: improve sanitization of table cell values to handle backslashes correctly
| `check-pull-request` | Check the pull request for `AB#xxx` (scope configurable via `pull-request-check-scope`) | `true` | `false` |
69
-
| `pull-request-check-scope` | Only if `check-pull-request=true`, where to look for `AB#` in the PR: `title-or-body`, `body-only`, or `title-only` | `false` | `title-or-body` |
70
-
| `check-commits` | Check each commit in the pull request for `AB#xxx` | `true` | `true` |
71
-
| `fail-if-missing-workitem-commit-link` | Only if `check-commits=true`, fail the action if a commit in the pull request is missing AB# in every commit message | `false` | `true` |
72
-
| `link-commits-to-pull-request` | Only if `check-commits=true`, link the work items found in commits to the pull request | `false` | `true` |
73
-
| `validate-work-item-exists` | Validate that the work item(s) referenced in commits and PR exist in Azure DevOps (requires `azure-devops-token` and `azure-devops-organization`) | `false` | `true` |
74
-
| `append-work-item-title` | Append the work item title to `AB#xxx` references in the PR body (e.g. `AB#123` becomes `AB#123 - Fix bug`). Requires `azure-devops-token` and `azure-devops-organization` | `false` | `false` |
75
-
| `azure-devops-organization` | Only if `check-commits=true`, link the work items found in commits to the pull request | `false` | `''` |
76
-
| `azure-devops-token` | Only required if `link-commits-to-pull-request=true`, Azure DevOps PAT used to link work item to PR (needs to be a `full` PAT) | `false` | `''` |
77
-
| `github-token` | The GitHub token that has contents-read and pull_request-write access | `true` | `${{ github.token }}` |
78
-
| `comment-on-failure` | Comment on the pull request if the action fails | `true` | `true` |
| `check-pull-request` | Check the pull request for `AB#xxx` (scope configurable via `pull-request-check-scope`) | `true` | `false` |
71
+
| `pull-request-check-scope` | Only if `check-pull-request=true`, where to look for `AB#` in the PR: `title-or-body`, `body-only`, or `title-only` | `false` | `title-or-body` |
72
+
| `check-commits` | Check each commit in the pull request for `AB#xxx` | `true` | `true` |
73
+
| `fail-if-missing-workitem-commit-link` | Only if `check-commits=true`, fail the action if a commit in the pull request is missing AB# in every commit message | `false` | `true` |
74
+
| `link-commits-to-pull-request` | Only if `check-commits=true`, link the work items found in commits to the pull request | `false` | `true` |
75
+
| `validate-work-item-exists` | Validate that the work item(s) referenced in commits and PR exist in Azure DevOps (requires `azure-devops-token` and `azure-devops-organization`) | `false` | `true` |
76
+
| `add-work-item-table` | Add a "Linked Work Items" table to the PR body showing titles for `AB#xxx` references (original references are preserved). Requires `azure-devops-token` and `azure-devops-organization` | `false` | `false` |
77
+
| `append-work-item-title` | **Deprecated** - use `add-work-item-table` instead. Will be removed in a future major version. | `false` | `false` |
78
+
| `azure-devops-organization` | Only if `check-commits=true`, link the work items found in commits to the pull request | `false` | `''` |
79
+
| `azure-devops-token` | Only required if `link-commits-to-pull-request=true`, Azure DevOps PAT used to link work item to PR (needs to be a `full` PAT) | `false` | `''` |
80
+
| `github-token` | The GitHub token that has contents-read and pull_request-write access | `true` | `${{ github.token }}` |
81
+
| `comment-on-failure` | Comment on the pull request if the action fails | `true` | `true` |
body: 'This PR implements AB#12345\n\n---\n<!-- AZDO-VALIDATOR: WORK-ITEM-TITLES-START -->\n### Linked Work Items\n| Work Item | Type | Title |\n|---|---|---|\n| [12345](https://dev.azure.com/my-org/_workitems/edit/12345) | Bug | Old title |\n<!-- AZDO-VALIDATOR: WORK-ITEM-TITLES-END -->'
Copy file name to clipboardExpand all lines: action.yml
+6-1Lines changed: 6 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,12 @@ inputs:
45
45
required: false
46
46
default: 'true'
47
47
append-work-item-title:
48
-
description: 'Append the work item title to AB#xxx references in the PR body (e.g. AB#123 becomes AB#123 - Fix bug). Requires azure-devops-token and azure-devops-organization to be set.'
48
+
description: 'Deprecated: Use add-work-item-table instead. This input will be removed in a future major version.'
49
+
deprecationMessage: 'The append-work-item-title input is deprecated. Use add-work-item-table instead.'
50
+
required: false
51
+
default: 'false'
52
+
add-work-item-table:
53
+
description: 'Add a Linked Work Items table to the PR body showing titles for AB#xxx references (original AB# references are preserved). Requires azure-devops-token and azure-devops-organization to be set.'
0 commit comments