From 617ee1e0ca3352280f9b8385d8e94965762eef56 Mon Sep 17 00:00:00 2001 From: Sean O'Grady <1761115+seanogdev@users.noreply.github.com> Date: Wed, 24 Jun 2026 20:58:33 +0100 Subject: [PATCH 1/3] Include PR title in lightweight comments 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 --- README.md | 2 +- src/teamwork.sh | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 847bb6a..972f480 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ jobs: ``` ## Usage -When creating a new PR, write in the description of the PR the URL of the task. The action will automatically add a comment in the task. Optionally, you may choose for a lightweight comment that will only include the PR URL and the user that performed the action, to enable this option set the `LIGHTWEIGHT_COMMENT` input to `true`. +When creating a new PR, write in the description of the PR the URL of the task. The action will automatically add a comment in the task. Optionally, you may choose for a lightweight comment that will only include the PR title, URL and the user that performed the action, to enable this option set the `LIGHTWEIGHT_COMMENT` input to `true`. Please note, the comment will be created in Teamwork under the account you have attached to this action. If the API key of the user you are using does not have permissions to access certain projects, the comment will not be created. diff --git a/src/teamwork.sh b/src/teamwork.sh index 0543348..27005f0 100644 --- a/src/teamwork.sh +++ b/src/teamwork.sh @@ -146,7 +146,7 @@ teamwork::pull_request_opened() { IFS=" " read -r -a pr_stats_array <<< "$pr_stats" if [ "$LIGHTWEIGHT_COMMENT" == "true" ]; then - teamwork::add_comment "[PR]($pr_url) opened by $user" + teamwork::add_comment "[PR]($pr_url) [**\"$pr_title\"**]($pr_url) opened by $user" else teamwork::add_comment " **$user** opened a PR: **$pr_title** @@ -176,7 +176,7 @@ teamwork::pull_request_closed() { if [ "$pr_merged" == "true" ]; then if [ "$LIGHTWEIGHT_COMMENT" == "true" ]; then - teamwork::add_comment "[PR]($pr_url) merged by $user" + teamwork::add_comment "[PR]($pr_url) [**\"$pr_title\"**]($pr_url) merged by $user" else teamwork::add_comment " **$user** merged a PR: **$pr_title** @@ -189,7 +189,7 @@ teamwork::pull_request_closed() { teamwork::move_task_to_column "$BOARD_COLUMN_MERGED" else if [ "$LIGHTWEIGHT_COMMENT" == "true" ]; then - teamwork::add_comment "[PR]($pr_url) closed without merging by $user" + teamwork::add_comment "[PR]($pr_url) [**\"$pr_title\"**]($pr_url) closed without merging by $user" else teamwork::add_comment " **$user** closed a PR without merging: **$pr_title** @@ -212,7 +212,7 @@ teamwork::pull_request_review_submitted() { # Only add a message if the PR has been approved if [ "$review_state" == "approved" ]; then if [ "$LIGHTWEIGHT_COMMENT" == "true" ]; then - teamwork::add_comment "[PR]($pr_url) approved by $user" + teamwork::add_comment "[PR]($pr_url) [**\"$pr_title\"**]($pr_url) approved by $user" else teamwork::add_comment " **$user** submitted a review to the PR: **$pr_title** From e7f57cdcd3484ceabe6067f55a24099ede0f7be1 Mon Sep 17 00:00:00 2001 From: Sean O'Grady <1761115+seanogdev@users.noreply.github.com> Date: Wed, 24 Jun 2026 21:05:39 +0100 Subject: [PATCH 2/3] Don't link the 'PR' label in lightweight comments 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 --- src/teamwork.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/teamwork.sh b/src/teamwork.sh index 27005f0..6394c84 100644 --- a/src/teamwork.sh +++ b/src/teamwork.sh @@ -146,7 +146,7 @@ teamwork::pull_request_opened() { IFS=" " read -r -a pr_stats_array <<< "$pr_stats" if [ "$LIGHTWEIGHT_COMMENT" == "true" ]; then - teamwork::add_comment "[PR]($pr_url) [**\"$pr_title\"**]($pr_url) opened by $user" + teamwork::add_comment "PR [**\"$pr_title\"**]($pr_url) opened by $user" else teamwork::add_comment " **$user** opened a PR: **$pr_title** @@ -176,7 +176,7 @@ teamwork::pull_request_closed() { if [ "$pr_merged" == "true" ]; then if [ "$LIGHTWEIGHT_COMMENT" == "true" ]; then - teamwork::add_comment "[PR]($pr_url) [**\"$pr_title\"**]($pr_url) merged by $user" + teamwork::add_comment "PR [**\"$pr_title\"**]($pr_url) merged by $user" else teamwork::add_comment " **$user** merged a PR: **$pr_title** @@ -189,7 +189,7 @@ teamwork::pull_request_closed() { teamwork::move_task_to_column "$BOARD_COLUMN_MERGED" else if [ "$LIGHTWEIGHT_COMMENT" == "true" ]; then - teamwork::add_comment "[PR]($pr_url) [**\"$pr_title\"**]($pr_url) closed without merging by $user" + teamwork::add_comment "PR [**\"$pr_title\"**]($pr_url) closed without merging by $user" else teamwork::add_comment " **$user** closed a PR without merging: **$pr_title** @@ -212,7 +212,7 @@ teamwork::pull_request_review_submitted() { # Only add a message if the PR has been approved if [ "$review_state" == "approved" ]; then if [ "$LIGHTWEIGHT_COMMENT" == "true" ]; then - teamwork::add_comment "[PR]($pr_url) [**\"$pr_title\"**]($pr_url) approved by $user" + teamwork::add_comment "PR [**\"$pr_title\"**]($pr_url) approved by $user" else teamwork::add_comment " **$user** submitted a review to the PR: **$pr_title** From e7a4dbde6e7bdc879e404ae26088193196f25545 Mon Sep 17 00:00:00 2001 From: Sean O'Grady <1761115+seanogdev@users.noreply.github.com> Date: Wed, 24 Jun 2026 21:10:22 +0100 Subject: [PATCH 3/3] Bold the user in lightweight comments Match the bold PR title by also bolding the actor's username, e.g. PR [**"Fix login"**](url) opened by **user** --- src/teamwork.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/teamwork.sh b/src/teamwork.sh index 6394c84..a80abb0 100644 --- a/src/teamwork.sh +++ b/src/teamwork.sh @@ -146,7 +146,7 @@ teamwork::pull_request_opened() { IFS=" " read -r -a pr_stats_array <<< "$pr_stats" if [ "$LIGHTWEIGHT_COMMENT" == "true" ]; then - teamwork::add_comment "PR [**\"$pr_title\"**]($pr_url) opened by $user" + teamwork::add_comment "PR [**\"$pr_title\"**]($pr_url) opened by **$user**" else teamwork::add_comment " **$user** opened a PR: **$pr_title** @@ -176,7 +176,7 @@ teamwork::pull_request_closed() { if [ "$pr_merged" == "true" ]; then if [ "$LIGHTWEIGHT_COMMENT" == "true" ]; then - teamwork::add_comment "PR [**\"$pr_title\"**]($pr_url) merged by $user" + teamwork::add_comment "PR [**\"$pr_title\"**]($pr_url) merged by **$user**" else teamwork::add_comment " **$user** merged a PR: **$pr_title** @@ -189,7 +189,7 @@ teamwork::pull_request_closed() { teamwork::move_task_to_column "$BOARD_COLUMN_MERGED" else if [ "$LIGHTWEIGHT_COMMENT" == "true" ]; then - teamwork::add_comment "PR [**\"$pr_title\"**]($pr_url) closed without merging by $user" + teamwork::add_comment "PR [**\"$pr_title\"**]($pr_url) closed without merging by **$user**" else teamwork::add_comment " **$user** closed a PR without merging: **$pr_title** @@ -212,7 +212,7 @@ teamwork::pull_request_review_submitted() { # Only add a message if the PR has been approved if [ "$review_state" == "approved" ]; then if [ "$LIGHTWEIGHT_COMMENT" == "true" ]; then - teamwork::add_comment "PR [**\"$pr_title\"**]($pr_url) approved by $user" + teamwork::add_comment "PR [**\"$pr_title\"**]($pr_url) approved by **$user**" else teamwork::add_comment " **$user** submitted a review to the PR: **$pr_title**