Skip to content

Add documentation for triagebot [canonicalize-issue-links] handler #825

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
- [PR Assignment](./triagebot/pr-assignment.md)
- [Tracking PR assignment](./triagebot/pr-assignment-tracking.md)
- [Autolabels](./triagebot/autolabels.md)
- [Canonicalize Issue Links](./triagebot/canonicalize-issue-links.md)
- [Close](./triagebot/close.md)
- [Documentation Updates](./triagebot/doc-updates.md)
- [GitHub Releases](./triagebot/github-releases.md)
Expand Down
17 changes: 17 additions & 0 deletions src/triagebot/canonicalize-issue-links.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Canonicalize Issue Links

GitHub permits having automatic action like `Fixes #123` which closes the issue number `123`, this handler updates the pull-request description with the canonicalized version, `Fixes org/repo#123`.

This is useful when updating subtrees into the upstream repository as it avoids referencing and closing the issue from the upstream repository instead of the one from the subtree.

## Configuration

This feature is enabled on a repository by having a `[canonicalize-issue-links]` table in `triagebot.toml`:

```toml
[canonicalize-issue-links]
```

## Implementation

See [`src/handlers/canonicalize_issue_links.rs`](https://github.com/rust-lang/triagebot/blob/HEAD/src/handlers/canonicalize_issue_links.rs).