Adding new param to link PR to work items to account for cross project linking #333
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces support for linking pull requests across different projects by adding an optional
pullRequestProjectId
parameter. It includes updates to both the implementation and corresponding tests to handle this new functionality.Feature Enhancements:
pullRequestProjectId
parameter in theconfigureWorkItemTools
function to allow linking pull requests from a different project. If not provided, it defaults to theprojectId
for same-project linking. (src/tools/workitems.ts
, src/tools/workitems.tsR367-R377)Test Updates:
New Test Cases for Cross-Project Linking:
pullRequestProjectId
is used instead ofprojectId
when provided. (test/src/tools/workitems.test.ts
, test/src/tools/workitems.test.tsR565-R642)projectId
whenpullRequestProjectId
is empty. (test/src/tools/workitems.test.ts
, test/src/tools/workitems.test.tsR565-R642)Parameter Updates in Existing Tests:
pullRequestProjectId
parameter where relevant. (test/src/tools/workitems.test.ts
, [1] [2] [3]GitHub issue number #330
Associated Risks
None
✅ PR Checklist
🧪 How did you test it?
Updated tests and tested manually