synclinear.com
synclinear.com copied to clipboard
References to issues should be re-written when synced
For example, here is an issue I just created in linear that was synced to GitHub:
That [TR-654] links back to Linear, instead of linking to the synced issue in GitHub. It would be great if those reference links could automatically be rewritten to reference the correct GitHub issue (or if the linear issue references isn't public, then it should just keep the link as is now)
Interesting! One possible approach:
- Include a RegEx check-and-replace for Linear ticket refs ("ABC-123" where "ABC" is known at runtime as
linearTeamId) inprepareMarkdownContent() - Check the DB for a GH issue corresponding to that ticket via the
SyncedIssuestable wherelinearIssueIdis known - For each Regex match, add a GH link if possible
- Watch out for infinite loops if the content is different on each side
Is checking that the content is equal the way you prevent infinite loops?
That's right, at least after SyncLinear's transformations: linearMarkdown === syncLinear(githubMarkdown)