Skip to content

Commit c516cb2

Browse files
chmouelpipelines-as-code[bot]
authored andcommitted
improve messages, making it more friendly
This commit enhances the readability and user-friendliness of the Boussole comment templates by improving formatting, adding thank you messages, and clarifying next steps for contributors. It also adds branding references to PAC Boussole with its GitHub repository link and a compass emoji. Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
1 parent c54045c commit c516cb2

File tree

2 files changed

+89
-25
lines changed

2 files changed

+89
-25
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,11 @@ We welcome contributions! Feel free to open issues or submit pull requests.
129129
### Why the name "Boussole"?
130130

131131
**Boussole** is French for *"compass,"* reflecting its role in guiding PR workflows. The name also pays homage to [La
132-
Boussole](https://en.wikipedia.org/wiki/French_ship_Boussole_(1782), a ship from the ill-fated La Pérouse expedition that disappeared
132+
Boussole](<https://en.wikipedia.org/wiki/French_ship_Boussole_(1782)>, a ship from the ill-fated La Pérouse expedition that disappeared
133133
in the Pacific—an analogy that may feel more or less fitting, depending on your experience with this project. 😉
134134

135135
**Pronunciation:** *Boussole* is pronounced **"boo-SOHL"** (/buˈsɔl/).
136+
136137
- Sounds like **"boo-soul"** in English.
137138
- The **"bou"** rhymes with *boo* (as in *boost* or *book*).
138139
- The **"ssole"** sounds like *soul*, but with a softer "L" at the end.

boussole/messages.py

Lines changed: 87 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,35 @@
1515
| `/cherry-pick target-branch`| Cherry-picks the PR changes to the target branch |
1616
| `/rebase` | Rebases the PR branch on the base branch |
1717
| `/help` | Shows this help message |
18+
19+
20+
*Automated by the [PAC Boussole](https://github.com/openshift-pipelines/pac-boussole) 🧭*
21+
1822
"""
1923

2024
APPROVED_TEMPLATE = """
25+
Thank you for your valuable contribution! 🎉
26+
2127
### ✅ Pull Request Approved
2228
23-
**Approval Status:**
29+
*Approval Status:*
2430
* Required Approvals: {threshold}
2531
* Current Approvals: {valid_votes}
2632
27-
### 👥 Approved By:
28-
| Reviewer | Permission | Status |
29-
|----------|------------|--------|
33+
### 👥 Reviewers Who Approved:
34+
| Reviewer | Permission Level | Approval Status |
35+
|----------|------------------|----------------|
3036
{users_table}
3137
3238
### 📝 Next Steps
33-
* All required checks must pass
34-
* Branch protection rules apply
35-
* Get a maintainer to use the `/merge` command to merge the PR
39+
* Ensure all required checks pass
40+
* Comply with branch protection rules
41+
* Request a maintainer to merge using the `/merge` command (or merge it
42+
directly if you have repository permission).
43+
44+
45+
*Automated by the [PAC Boussole](https://github.com/openshift-pipelines/pac-boussole) 🧭*
3646
37-
Thank you for your contributions! 🎉
3847
"""
3948

4049
LGTM_BREAKDOWN_TEMPLATE = """
@@ -43,47 +52,65 @@
4352
* **Current valid votes:** {valid_votes}/{threshold}
4453
* **Voting required for approval:** {threshold}
4554
46-
**Votes Summary:**
55+
*Votes Summary:*
4756
| Reviewer | Permission | Valid Vote |
4857
|----------|------------|------------|
4958
{users_table}
5059
60+
61+
*Automated by the [PAC Boussole](https://github.com/openshift-pipelines/pac-boussole) 🧭*
62+
5163
"""
5264

5365
SUCCESS_MERGED = """
5466
### ✅ PR Successfully Merged
5567
68+
Thank you again for your valuable contribution! 🎉
69+
5670
* Merge method: `{merge_method}`
57-
* Merged by: **@{comment_sender}**
58-
* Total approvals: **{valid_votes}/{lgtm_threshold}**
71+
* Merged by: **@{comment_sender}*
72+
* Total approvals: **{valid_votes}/{lgtm_threshold}*
5973
60-
**Approvals Summary:**
74+
*Approvals Summary:*
6175
| Reviewer | Permission | Status |
62-
|----------|------------|--------|
63-
{users_table}
76+
77+
*{users_table}*
78+
79+
80+
81+
*Automated by the [PAC Boussole](https://github.com/openshift-pipelines/pac-boussole) 🧭*
82+
6483
"""
6584

6685
# Error and status message templates
6786
PERMISSION_CHECK_ERROR = """
6887
### ⚠️ Permission Check Failed
6988
70-
Unable to verify permissions for user **@{user}**
89+
Unable to verify permissions for user **@{user}*
7190
* API Response Status: `{status_code}`
7291
* This might be due to:
7392
* User not being a repository collaborator
7493
* Invalid authentication
7594
* Rate limiting
7695
7796
Please check user permissions and try again.
97+
98+
99+
*Automated by the [PAC Boussole](https://github.com/openshift-pipelines/pac-boussole) 🧭*
100+
78101
"""
79102

80103
PERMISSION_DATA_MISSING = """
81104
### ❌ Permission Data Missing
82105
83-
Failed to retrieve permission level for user **@{user}**
106+
Failed to retrieve permission level for user **@{user}*
84107
* Received empty permission data from GitHub API
85108
* This might indicate an API response format change
86109
* Please contact repository administrators for assistance
110+
111+
112+
*Automated by the [PAC Boussole](https://github.com/openshift-pipelines/pac-boussole) 🧭*
113+
87114
"""
88115

89116
COMMENTS_FETCH_ERROR = """
@@ -93,10 +120,14 @@
93120
* Status Code: `{status_code}`
94121
* Response: `{response_text}`
95122
96-
**Troubleshooting Steps:**
123+
*Troubleshooting Steps:*
97124
1. Check your authentication token
98125
2. Verify PR number: `{pr_num}`
99126
3. Ensure the PR hasn't been closed or deleted
127+
128+
129+
*Automated by the [PAC Boussole](https://github.com/openshift-pipelines/pac-boussole) 🧭*
130+
100131
"""
101132

102133
SELF_APPROVAL_ERROR = """
@@ -107,6 +138,10 @@
107138
* Please [delete the comment]({comment_url}) before continuing.
108139
109140
Please wait for reviews from other team members.
141+
142+
143+
*Automated by the [PAC Boussole](https://github.com/openshift-pipelines/pac-boussole) 🧭*
144+
110145
"""
111146

112147
INSUFFICIENT_PERMISSIONS = """
@@ -117,15 +152,21 @@
117152
* Required permissions: `{required_permissions}`
118153
119154
Please request assistance from a repository maintainer.
155+
156+
*Automated by the [PAC Boussole](https://github.com/openshift-pipelines/pac-boussole) 🧭*
120157
"""
121158

122159
NOT_ENOUGH_LGTM = """
123160
### ❌ Insufficient Approvals
124161
125-
* Current valid LGTM votes: **{valid_votes}**
126-
* Required votes: **{threshold}**
162+
* Current valid LGTM votes: **{valid_votes}*
163+
* Required votes: **{threshold}*
127164
128165
Please obtain additional approvals before merging.
166+
167+
168+
*Automated by the [PAC Boussole](https://github.com/openshift-pipelines/pac-boussole) 🧭*
169+
129170
"""
130171

131172
MERGE_FAILED = """
@@ -135,12 +176,14 @@
135176
* Status Code: `{status_code}`
136177
* Error: `{error_text}`
137178
138-
**Possible causes:**
179+
*Possible causes:*
139180
* Branch protection rules not satisfied
140181
* Merge conflicts present
141182
* Required checks failing
142183
143184
Please resolve any issues and try again.
185+
186+
*Automated by the [PAC Boussole](https://github.com/openshift-pipelines/pac-boussole) 🧭*
144187
"""
145188

146189
# Add new error message template for cherry-pick
@@ -151,25 +194,32 @@
151194
* Status Code: `{status_code}`
152195
* Error: `{error_text}`
153196
154-
**Possible causes:**
197+
*Possible causes:*
155198
* Merge conflicts
156199
* Branch protection rules
157200
* Invalid branch name
158201
* Missing permissions
159202
160203
Please resolve any issues and try again.
204+
205+
*Automated by the [PAC Boussole](https://github.com/openshift-pipelines/pac-boussole) 🧭*
206+
161207
"""
162208

163209
CHERRY_PICK_SUCCESS = """
164210
### ✅ Cherry Pick Successful
165211
166212
Successfully cherry-picked changes from PR #{source_pr} to branch `{target_branch}`.
167213
168-
**Details:**
214+
*Details:*
169215
* Source PR: #{source_pr}
170216
* Target Branch: `{target_branch}`
171217
* Cherry-picked by: @{user}
172218
* New commit SHA: `{commit_sha}`
219+
220+
221+
*Automated by the [PAC Boussole](https://github.com/openshift-pipelines/pac-boussole) 🧭*
222+
173223
"""
174224

175225
CHERRY_PICK_CONFLICT = """
@@ -196,9 +246,14 @@
196246
```shell
197247
git push YOURFORKREMOTE resolve-cherry-pick-{self.pr_num} --force-with-lease
198248
gh pr create --base {target_branch} --head YOURFORK:resolve-cherry-pick-{self.pr_num}
249+
199250
```
200251
201252
Need assistance? Please contact the repository maintainers.
253+
254+
255+
*Automated by the [PAC Boussole](https://github.com/openshift-pipelines/pac-boussole) 🧭*
256+
202257
"""
203258

204259
REVIEW_REQUESTED = """{greeting}
@@ -213,12 +268,20 @@
213268
⏰ Take your time - there's no immediate rush, but a timely review would be
214269
appreciated.
215270
216-
Thank you for your help! 🙌"""
271+
Thank you for your help! 🙌
272+
273+
274+
*Automated by the [PAC Boussole](https://github.com/openshift-pipelines/pac-boussole) 🧭*
275+
276+
"""
217277

218278

219279
CHECKS_NOT_PASSED = """⚠️ Cannot merge PR: Some required checks haven't completed successfully.
220280
221281
{status_table}
222282
223283
🔍 Please ensure all checks pass before merging.
224-
💡 Tip: Review the failing checks above and address any issues."""
284+
💡 Tip: Review the failing checks above and address any issues.
285+
286+
*Automated by the [PAC Boussole](https://github.com/openshift-pipelines/pac-boussole) 🧭*
287+
"""

0 commit comments

Comments
 (0)