common-lint-reporter's final step, it's report lint result to GitHub
- uses: MeilCli/common-lint-reporter@v0
with:
report_type: 'check_run'
report_name: 'Lint Report'
Report lint-result as check-run annotations or check-run summary
Check-run is based on Commit, so this reporter type can use target of Commit or PullRequest
Report lint-result as PullRequest comment
This reporter type is only usable when provided pull_request
.
common-lint-reporter find pull_request
number automally. but, if use workflow_run
workflow, cannot find pull_request
number.
more inforemation: this
Report lint-result as PullRequest review comment or comment
This reporter type is only usable when provided pull_request
.
common-lint-reporter find pull_request
number automally. but, if use workflow_run
workflow, cannot find pull_request
number.
more inforemation: this
You can select way to resolve when common-lint-reporter find outdated review comment
resolve_thread
: resolve review thread, but doesn't resolve it when additional comment by anyoneforce_resolve_thread
: resolve review thread anytimedelete_thread
: delete review thread, but doesn't delte it when additional comment by anyonedelete_or_force_resolve_thread
: delete review thread, or resolve review thread when additional comment by anyone
github_token
:- github app token, using to read and write repository
- required
- default:
${{ github.token }}
workspace_path
:- workspace path, using to convert relative path from absolute path
repository
:- running repository, format: owner/repository
pull_request
:- running pull request number
commit_sha
:- running commit sha
report_files
:- report file glob pattern
- required
- default:
common_lint.json
report_files_follow_symbolic_links
:- report file glob pattern option
- value:
true
orfalse
report_name
:- report name, if multiple report, should be unique name
- required
- default:
Lint report
report_type
:- report type, value is
check_run
orcomment
orinline_comment
- required
- default:
check_run
- report type, value is
conclusion_failure_threshold
:- threshold of conclution as failure
- required
- default:
100
conclusion_failure_weight
:- weight of reported failure by lint for conclusion
- required
- default:
100
conclusion_warning_weight
:- weight of reported warning by lint for conclusion
- required
- default:
1
conclusion_notice_weight
:- weight of reported notice by lint for conclusion
- required
- default:
0
outdated_resolver
:- inline_comment only option, option of how resolve when found outdated thread
- value:
resolve_thread
orforce_resolve_thread
ordelete_thread
ordelete_or_force_resolve_thread
- default:
delete_or_force_resolve_thread
Conclusion is calculated each lint-level count and weight:
const score =
noticeCount * option.conclusionNoticeWeight +
warningCount * option.conclusionWarningWeight +
failureCount * option.conclusionFailureWeight;
return score < option.conclusionFailureThreshold ? CheckConclusionState.Success : CheckConclusionState.Failure;