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

Github Comment Reporter: add configuration option for 'current run' link #1341

Closed
mjpieters opened this issue Mar 18, 2022 · 1 comment · Fixed by #1357
Closed

Github Comment Reporter: add configuration option for 'current run' link #1341

mjpieters opened this issue Mar 18, 2022 · 1 comment · Fixed by #1357
Labels
enhancement New feature or request

Comments

@mjpieters
Copy link
Contributor

Is your feature request related to a problem? Please describe.

I'm running Mega-Linter in Jenkins, and provide GITHUB_TOKEN, GITHUB_REPOSITORY and GITHUB_SHA environment variables so the Github Reporter knows where to post a comment. This works great.

However, the comment ends with:

See errors details in MegaLinter reports

with no further context. However, I'm also uploading the Mega-Linter reports folder as artifacts, that I'd love to link here.

Describe the solution you'd like

The reporter could take a configuration parameter (CI_ACTION_RUN_URL perhaps?) that, if set, is used as the action_run_url variable in the reporter. If set, the reporter would ignore GITHUB_RUN_ID and not generate a URL based on that, but just use the provided URL.

I can then provide the URL as built from variables set by Jenkins, such as ${BUILD_URL}/artifacts.

Describe alternatives you've considered

I would have to create a separate step that also posts a comment, as there is no option to alter the comment content before it is posted.

@nvuillam
Copy link
Member

@mjpieters good proposition, PR is on its way :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants