Skip to content

Link the MR in Slack notifications, publish Docker on release - #22

Merged
sergeyfast merged 2 commits into
masterfrom
feat/slack-mr-link
Sep 30, 2026
Merged

sergeyfast merged 2 commits into
masterfrom
feat/slack-mr-link

Conversation

@sergeyfast

@sergeyfast sergeyfast commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

Summary

Slack review notifications now link the merge request, so readers reach the MR in one click instead of going through the reviewer UI. The title still opens the review.

🟡 [group/app] <…/-/merge_requests/42|MR !42> *<…/reviews/5/|ABC-1 Add upload>* by john (`ABC-1` → `main`) — 0 critical, 0 high, 7 medium, 11 low
  • MR link: reviewer.Project.MergeRequestLink builds <vcsURL>/-/merge_requests/<id> (MR !42) or, for github.com, <vcsURL>/pull/<id> (PR #42) from the review's externalId. No link unless the ID is a positive number and the project has a VCS URL, so the message is unchanged otherwise. Fusion reviews carry the external ID too.

  • Escaping fix: &, <, > in the project, title, author, branches and MR label are escaped for Slack mrkdwn; a > in an MR title used to break the review link.

  • Docs: message format updated in docs/llm/Slack.md.

  • CI: Docker images are published by go.yml after GoReleaser (docker.yml as a reusable workflow). A release created with GITHUB_TOKEN never triggered on: release, so every image needed a manual dispatch. Release images are tagged latest too (it was stuck since April); manual rebuilds leave latest alone.

Test plan

  • make fmt lint test clean
  • Unit tests for link building (GitLab, GitHub, trailing slash, empty / 0 / non-numeric ID, no VCS URL) and message text (with / without MR, escaping)
  • notifySlack wiring test through a webhook stub (fails when the MR link is not passed)
  • Check the first real notification in Slack: MR link renders and escaped branch names show as-is inside code spans

- Add Project.MergeRequestLink: GitLab MR or GitHub PR URL and label
  from the review's external ID, empty unless it is a positive number
- Show the MR link after the project tag so readers reach the MR in
  one click; the title still opens the review
- Fix mrkdwn escaping: "&", "<" and ">" in the project, title, author
  or branches broke the review link
- Cover link building, message text and notifySlack wiring with tests
- Update the message format in docs/llm/Slack.md
- Fix Docker publishing: a release created by GoReleaser with
  GITHUB_TOKEN never triggered docker.yml, so images needed a manual
  dispatch
- Call docker.yml from go.yml after the release job, so images are
  built only for tags that passed tests and GoReleaser
- Tag release images as latest too; manual rebuilds keep latest as is
@sergeyfast sergeyfast changed the title Link the merge request in Slack notifications Link the MR in Slack notifications, publish Docker on release Sep 30, 2026
@sergeyfast
sergeyfast merged commit 58e82ec into master Sep 30, 2026
5 checks passed
@sergeyfast
sergeyfast deleted the feat/slack-mr-link branch September 30, 2026 10: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.

1 participant