Summary
Add support for Azure DevOps Pipelines so the Worktree workspace link comment is posted on new work items, while keeping the core comment-building logic shared between platforms.
Motivation
Currently src/index.mjs is tightly coupled to GitHub Actions (@actions/core, @actions/github). Users on Azure DevOps should get the same experience — a comment with an Open workspace link posted automatically when a work item is created.
Proposed Architecture
Extract platform-agnostic logic into a shared module and implement thin platform adapters:
src/
comment.mjs # shared: builds the comment body given { owner, repo, issue }
github/index.mjs # GitHub Actions adapter: reads context, calls Octokit
azure/index.mjs # Azure DevOps adapter: reads pipeline env vars, calls ADO REST API
Shared (comment.mjs)
buildCommentBody({ owner, repo, issue }) — returns the markdown string with the badge and footer
- No platform dependencies
GitHub adapter (github/index.mjs)
- Reads
owner, repo, issue_number from @actions/github context
- Guards on
issues.opened event
- Posts comment via Octokit (
issues.createComment)
- Logs via
@actions/core
Azure DevOps adapter (azure/index.mjs)
- Reads
owner, project, workItemId from ADO pipeline environment variables (SYSTEM_TEAMPROJECT, BUILD_REPOSITORY_NAME, etc.)
- Guards on work item created event (ADO service hook or pipeline trigger)
- Posts comment via Azure DevOps Work Item Comments REST API
- Logs via
console or azure-pipelines-task-lib
Open Questions
- Should the Azure adapter be a separate action (new
action.yml) or a new entry point in this repo?
- Authentication: PAT vs service connection for ADO?
- ADO equivalent of "issue opened" trigger — service hook vs pipeline step?
Summary
Add support for Azure DevOps Pipelines so the Worktree workspace link comment is posted on new work items, while keeping the core comment-building logic shared between platforms.
Motivation
Currently
src/index.mjsis tightly coupled to GitHub Actions (@actions/core,@actions/github). Users on Azure DevOps should get the same experience — a comment with an Open workspace link posted automatically when a work item is created.Proposed Architecture
Extract platform-agnostic logic into a shared module and implement thin platform adapters:
Shared (
comment.mjs)buildCommentBody({ owner, repo, issue })— returns the markdown string with the badge and footerGitHub adapter (
github/index.mjs)owner,repo,issue_numberfrom@actions/githubcontextissues.openedeventissues.createComment)@actions/coreAzure DevOps adapter (
azure/index.mjs)owner,project,workItemIdfrom ADO pipeline environment variables (SYSTEM_TEAMPROJECT,BUILD_REPOSITORY_NAME, etc.)consoleorazure-pipelines-task-libOpen Questions
action.yml) or a new entry point in this repo?