Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added new reporter: BITBUCKET_COMMENT_REPORTER Reporter (#3256)
* Add support of summary report * Make summary reporter disabled by default * change summary report type to md * Add documentation * Incorporated PR comments * Updated docs: Changed SUMMARY Reporter to MARKDOWN_SUMMARY Reporter * doc fix * Added Bitbucket comment reporter * update link * Minor fixes * Mark this as active by default * Fix linter errors --------- Co-authored-by: Nicolas Vuillamy <nicolas.vuillamy@gmail.com>
- Loading branch information
1 parent
6872be3
commit 2196502
Showing
10 changed files
with
250 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
title: Bitbucket Pull Request Comments Reporter for MegaLinter | ||
description: Posts MegaLinter SAST results summary in the comments of the related Bitbucket Pull Request (if existing) | ||
--- | ||
<!-- markdownlint-disable MD013 MD033 MD041 --> | ||
# Bitbucket Comment Reporter | ||
|
||
Posts MegaLinter results summary in the comments of the related Bitbucket pull request (if existing) | ||
|
||
## Usage | ||
|
||
Click on hyperlinks to access detailed logs (click on **Download** in **Artifacts section** at the left of a CI job page) | ||
|
||
![Screenshot](../assets/images/BitbucketCommentReporter.png) | ||
|
||
After a first MegaLinter run, a comment is posted on the PR. To avoid multiplicating MegaLinter PR comments, future MegaLinter runs will update the existing PR comment instead of posting a new one. | ||
|
||
If you really want a new PR comment for each MegaLinter run, define variable `BITBUCKET_COMMENT_REPORTER_OVERWRITE_COMMENT` to `false`. | ||
|
||
## Configuration | ||
|
||
- [Create a Repository Access Token](https://support.atlassian.com/bitbucket-cloud/docs/create-a-repository-access-token/) with scope **Pull-requests: Write** | ||
- Paste the access token in a [masked CI/CD variable](https://support.atlassian.com/bitbucket-cloud/docs/variables-and-secrets/) named **BITBUCKET_REPO_ACCESS_TOKEN** in your project (repository) | ||
|
||
| Variable | Description | Default value | | ||
|----------------------------------------------|----------------------------------------------------------------------------------------------|---------------| | ||
| BITBUCKET_COMMENT_REPORTER | Activates/deactivates reporter | `true` | | ||
| BITBUCKET_REPO_ACCESS_TOKEN | Must contain a Bitbucket repository access token defined with api access | <!-- --> | | ||
| BITBUCKET_COMMENT_REPORTER_OVERWRITE_COMMENT | Set to false to not overwrite existing comments in case of new runs on the same Pull Request | `true` | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.