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

feat: add tool name to PR comment header #12

Merged
merged 2 commits into from
Sep 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.4.0] - 2023-09-19

### Added

- Add tool name to PR comment header

## [1.3.0] - 2023-09-19

### Added
Expand Down Expand Up @@ -51,7 +57,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Improve logging
- Update dependencies and refactor action

[Unreleased]: https://github.com/mercedesbenzio/detect-action/compare/v1.3.0...main
[Unreleased]: https://github.com/mercedesbenzio/detect-action/compare/v1.4.0...main
[1.4.0]: https://github.com/mercedesbenzio/detect-action/compare/v1.3.0...v1.4.0
[1.3.0]: https://github.com/mercedesbenzio/detect-action/compare/v1.2.0...v1.3.0
[1.2.0]: https://github.com/mercedesbenzio/detect-action/compare/v1.1.0...v1.2.0
[1.1.0]: https://github.com/mercedesbenzio/detect-action/compare/v1.0.0...v1.1.0
Expand Down
4 changes: 2 additions & 2 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions src/report/blackduck-report-generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ const HEADER =
const HEADER_ALIGNMENT = '|-|-|-|-|-|-|'

const SUCCESS_COMMENT =
'# :white_check_mark: None of your dependencies violate policy!'
'# :white_check_mark: BlackDuck - None of your dependencies violate policy!'
const FAIL_COMMENT = (fail: boolean): string =>
`# ${fail ? ':x:' : ':warning:'} Found dependencies violating policy!`
`# ${
fail ? ':x:' : ':warning:'
} BlackDuck - Found dependencies violating policy!`

export class BlackDuckReportGenerator
implements ReportGenerator<ReportProperties, ReportResult>
Expand Down