Skip to content

feat(github): link pull requests to tracker issues#10889

Open
ignatremizov wants to merge 1 commit into
hcengineering:developfrom
ignatremizov:feat/github-pr-issue-links
Open

feat(github): link pull requests to tracker issues#10889
ignatremizov wants to merge 1 commit into
hcengineering:developfrom
ignatremizov:feat/github-pr-issue-links

Conversation

@ignatremizov
Copy link
Copy Markdown
Contributor

@ignatremizov ignatremizov commented May 25, 2026

Summary

  • Detect Huly Tracker identifiers such as ABC-123 in GitHub pull request titles and bodies during webhook and pull request sync processing.
  • Resolve matching Tracker issues by identifier and create an idempotent GitHub backlink comment plus a Huly activity item linking back to the pull request.
  • Suppress creation of duplicate GitHub pull request mirror tasks when a PR already references an existing non-PR Tracker issue.
  • Preserve the normal GitHub pull request mirror flow when no matching Tracker issue is found, or when the matched identifier already points to a GitHub pull request mirror.
  • Keep GITHUB_READONLY=true suppressing ordinary Huly comment writes to GitHub while allowing the explicit PR-to-Tracker backlink flow.

Testing

  • node common/scripts/install-run-rush.js build --to @hcengineering/pod-github
  • cd services/github/pod-github && node ../../../common/scripts/install-run-rushx.js test -- --runTestsByPath src/sync/__tests__/pullrequests.test.ts
  • git diff --check

Notes

  • PRs that include an identifier like ABC-123 for an existing ordinary Huly Tracker issue will no longer create a separate GitHub pull request mirror task; they will link to the existing issue instead.
  • Existing duplicate PR mirror tasks are not migrated or deleted by this change.
  • The GitHub backlink comment uses a hidden marker to avoid duplicate comments across repeated webhook or sync processing.
  • If a referenced identifier cannot be resolved, or resolves to an existing GitHub pull request mirror, the existing PR mirror sync behavior is preserved.

Detect Huly Tracker identifiers such as ABC-123 in GitHub pull request titles and bodies, then link matching ordinary Tracker issues to the pull request instead of creating duplicate PR mirror tasks.

The sync path now creates an idempotent GitHub backlink comment and a Huly activity item for resolved Tracker issues. PRs with no matching issue, or identifiers that already resolve to GitHub pull request mirrors, continue through the existing mirror sync flow.

Ordinary Huly comment writes remain suppressed when GitHub writes are disabled, while the explicit PR-to-Tracker backlink remains part of the linking flow.

Signed-off-by: Ignat Remizov <[email protected]>
@huly-github-staging
Copy link
Copy Markdown

Connected to Huly®: UBERF-16479

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.

1 participant