Skip to content

Commit 7337498

Browse files
fix: mention proper permission level and login for GitLab (#2024)
fix: mention proper permission level and login for GitLab When creating commit statuses to GitLab, Packit needs to have Developer permissions to create them. Also add a proper login instead of the generic “author of the comment”. Reviewed-by: Laura Barcziová Reviewed-by: Matej Focko
2 parents f3ec1ad + 0d54b59 commit 7337498

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

packit_service/worker/helpers/job_helper.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -181,14 +181,15 @@ def _report(
181181
so we can extend it in subclasses easily.
182182
"""
183183
if self.is_gitlab_instance and not self.is_reporting_allowed:
184+
login = self.project.service.user.get_username()
184185
description = (
185-
f"{description}\n\n---\nPackit-User does not have access to the "
186+
f"{description}\n\n---\nPackit does not have access to the "
186187
"source project (=usually author's fork of the project). "
187188
"(This is only about the representation of the results. "
188189
"Packit is still able to do its job without having the permissions.)\n\n"
189190
"*In case you wish to receive commit statuses instead of comments, please "
190-
"add login of the author of this comment to your fork with a role "
191-
"`Reporter`.*"
191+
f"add {login} to your fork with a role `Developer`.*"
192+
" For more details see our [guide](https://packit.dev/docs/guide#gitlab)."
192193
)
193194

194195
final_commit_states = (

0 commit comments

Comments
 (0)