Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitLab Comment Reporter reports incorrect information on failure #1228

Closed
jberkers42 opened this issue Jan 31, 2022 · 2 comments · Fixed by #1236
Closed

GitLab Comment Reporter reports incorrect information on failure #1228

jberkers42 opened this issue Jan 31, 2022 · 2 comments · Fixed by #1236
Labels
bug Something isn't working

Comments

@jberkers42
Copy link

Describe the bug
When a failure of the GitLab Comment Reporter fails due to various reasons, it reports error messages with incorrect information, such as the name of the Token Variable, or referencing GitHub Comment reporter as it's own name.

To Reproduce
Steps to reproduce the behavior:

  1. Configure a GitLab Access Token as instructed for the project, but use an invalid token.
  2. Trigger a Pipeline through a push to a new branch and create an MR
  3. Monitor the output from the MegaLinter job
  4. An error will report that you may need to create a variable named MEGALINTER_ACCESS_TOKEN
[Gitlab Comment Reporter] You may need to define a masked Gitlab CI/CD variable MEGALINTER_ACCESS_TOKEN containing a personal token with scope 'api'

Under other circumstances error messages may refer to GitHub Comment Reporter. Assume this is a result of using the GitHub Comment Reporter code as a basis, and missing one or more references in making updates.

[GitHub Comment Reporter] Unable to post merge request comment

Expected behavior
When a token error is reported, it should identify the correct expected variable name:

[Gitlab Comment Reporter] You may need to define a masked Gitlab CI/CD variable GITLAB_ACCESS_TOKEN_MEGALINTER containing a personal token with scope 'api'

and

[GitLab Comment Reporter] Unable to post merge request comment

Additional context
I have been performing initial tests with a GitLab CE Omnibus install in our environment, and encountered these messages during testing.

@nvuillam
Copy link
Member

nvuillam commented Feb 1, 2022

@jberkers42 thanks for noticing and reporting, PR is on the way :)

@jberkers42
Copy link
Author

Thanks for addressing this so quickly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants