platform icon indicating copy to clipboard operation
platform copied to clipboard

feat(github): link pull requests to tracker issues

Open ignatremizov opened this issue 6 months ago • 1 comments

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.

ignatremizov avatar May 25 '26 15:05 ignatremizov

Connected to Huly®: UBERF-16479

huly-github-staging avatar May 25 '26 15:05 huly-github-staging