platform
platform copied to clipboard
feat(github): link pull requests to tracker issues
Summary
- Detect Huly Tracker identifiers such as
ABC-123in 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=truesuppressing 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-githubcd services/github/pod-github && node ../../../common/scripts/install-run-rushx.js test -- --runTestsByPath src/sync/__tests__/pullrequests.test.tsgit diff --check
Notes
- PRs that include an identifier like
ABC-123for 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.
Connected to Huly®: UBERF-16479