Skip to content

Only match task links on the configured Teamwork site - #77

Open
marcizhu wants to merge 1 commit into
fix-sync-bugsfrom
match-task-links-to-site
Open

marcizhu wants to merge 1 commit into
fix-sync-bugsfrom
match-task-links-to-site

Conversation

@marcizhu

Copy link
Copy Markdown
Member

Stack: 1. #75 tests → 2. #76 bug fixes → 3. #77 link matching → 4. #78 secrets → 5. #79 test mode removal

Summary

Any tasks/<digits> in the PR body counted as a task link, so text like subtasks/5, GitHub paths such as scripts/tasks/2024_cleanup.py or links to other Teamwork sites updated unrelated tasks. Now only links on the TEAMWORK_URI host count, e.g. …/app/tasks/123 or …/#/tasks/123. Links that use a different hostname from TEAMWORK_URI (say, a custom domain) will stop matching without an error, so the README now says links must point to that site. Test mode still accepts any host until #79 removes it.

Evidence

  • Before: task-links looks up tasks 5, 2024 and 1003 (on another site), and the failures fail the run.
    exit code: 1
    ...
    GET /projects/api/v1/tasks/5.json -> 404
    GET /projects/api/v1/tasks/2024.json -> 404
    GET /projects/api/v1/tasks/1003.json -> 200
    POST /tasks/1003/comments.json -> 500
    
    After: only tasks 1001 and 1002, exit code: 0.

🤖 Generated with Claude Code

Any "tasks/<digits>" in the PR body counted as a task link, including
"subtasks/5", paths like scripts/tasks/2024_cleanup.py on GitHub, and
links to other Teamwork sites, so the action could comment on unrelated
tasks. Only count links on the TEAMWORK_URI host whose path has a
/tasks/<id> or #tasks/<id> part.

Test mode keeps accepting any host, since its events link to placeholder
sites.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@marcizhu
marcizhu requested a review from a team as a code owner October 20, 2026 18:20
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.

2 participants