Skip to content

Include PR title in lightweight comments#70

Merged
seanogdev merged 3 commits into
masterfrom
lightweight-comment-keep-title
Jun 24, 2026
Merged

Include PR title in lightweight comments#70
seanogdev merged 3 commits into
masterfrom
lightweight-comment-keep-title

Conversation

@seanogdev

Copy link
Copy Markdown
Contributor

Summary

LIGHTWEIGHT_COMMENT keeps Teamwork comments brief, but it also dropped the PR title — the comment was just [PR](url) opened by user, which gives no hint of which PR a task is referring to.

This keeps the comment to a single line but restores the title: the PR title is rendered bold, quoted, and linked to the PR right after the PR label, e.g.

PR "Fix login redirect" opened by alice

The same treatment is applied to all four lightweight events: opened, merged, closed-without-merge, and review-approved. The verbose (non-lightweight) comments are unchanged. README updated to note the title is now included.

Test Task

When LIGHTWEIGHT_COMMENT is enabled, the Teamwork comments dropped the
PR title entirely. Add the title as a bold, linked label after the PR
link so brief comments still surface which PR they refer to while
staying to a single line, e.g.

  [PR](url) [**"Fix login"**](url) opened by user
@seanogdev seanogdev requested a review from a team as a code owner June 24, 2026 20:01
@seanogdev seanogdev requested a review from rafaeljusto June 24, 2026 20:01
The title is already linked to the PR, so linking the 'PR' label to the
same URL was redundant. Keep 'PR' as plain text and link only the title:

  PR [**"Fix login"**](url) opened by user

@rafaeljusto rafaeljusto left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one!

Match the bold PR title by also bolding the actor's username, e.g.

  PR [**"Fix login"**](url) opened by **user**
@seanogdev seanogdev merged commit fd4c7d6 into master Jun 24, 2026
2 checks passed
@seanogdev seanogdev deleted the lightweight-comment-keep-title branch June 24, 2026 20:12
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