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
{{ message }}
Repository navigation
Add Azure DevOps support with shared core comment logic #1
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
Resolved: same repo, separate entry points — no filename conflict.
GitHub Actions uses action.yml (already exists)
Azure DevOps tasks use task.json (new file)
Both manifests can live at the repo root and point to their respective adapter entry points (dist/github/index.mjs and dist/azure/index.mjs). The shared comment.mjs core is bundled into both.
After discussion, we've decided to implement Azure DevOps support in a separate repository (e.g. worktree-io/azure-comment-action) rather than extending this one.
Reasons:
Keeps this repo focused on GitHub Actions only
Azure DevOps tasks have a different release/publish lifecycle (task.json vs action.yml, separate marketplace)
Avoids coupling the GitHub Action build to ADO tooling and dependencies
Each adapter can version independently
The shared buildCommentBody logic can live in a small shared package or be duplicated across the two repos given its simplicity. The ADO adapter work will be tracked in the new repo.
Activity
github-actions commentedon Feb 23, 2026
A workspace is ready for this issue.
Powered by Worktree · Install
tupe12334 commentedon Feb 23, 2026
Resolved: same repo, separate entry points — no filename conflict.
action.yml(already exists)task.json(new file)Both manifests can live at the repo root and point to their respective adapter entry points (
dist/github/index.mjsanddist/azure/index.mjs). The sharedcomment.mjscore is bundled into both.tupe12334 commentedon Feb 23, 2026
Resolved: use
System.AccessToken— the built-in ADO pipeline token, equivalent togithub.token.env: AZURE_TOKEN: $(System.AccessToken)The
task.jsoninput will mirror the GitHubaction.yml:{ "name": "token", "type": "string", "defaultValue": "$(System.AccessToken)" }tupe12334 commentedon Feb 23, 2026
Resolved: Option B — Service Hook → Pipeline trigger → Task step.
Azure Pipelines have no native "work item created" trigger, so a service hook is used to fire the pipeline:
task.json(ADO task manifest)Add Azure DevOps support with shared core comment logic
tupe12334 commentedon Feb 23, 2026
After discussion, we've decided to implement Azure DevOps support in a separate repository (e.g.
worktree-io/azure-comment-action) rather than extending this one.Reasons:
task.jsonvsaction.yml, separate marketplace)The shared
buildCommentBodylogic can live in a small shared package or be duplicated across the two repos given its simplicity. The ADO adapter work will be tracked in the new repo.