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

✨ Scorecard returns a non-zero exit code if any check has a runtime error #2133

Merged
merged 5 commits into from
Aug 15, 2022

Conversation

spencerschrock
Copy link
Contributor

What kind of change does this PR introduce?

Scorecard now returns a non-zero exit code if any checks return a runtime error.

What is the current behavior?

Scorecard returns an exit code of 0 if most checks have runtime errors

What is the new behavior (if this is a feature change)?**

Scorecard now returns an exit code of 1 in the same scenarios

  • Tests for the changes have been added (for bug fixes/features)

Which issue(s) this PR fixes

Fixes #2124

Special notes for your reviewer

Had to modify a few existing checks to conform to the new semantics.

Does this PR introduce a user-facing change?

For user-facing changes, please add a concise, human-readable release note to
the release-note

(In particular, describe what changes users might need to make in their
application as a result of this pull request.)

Scorecard runs with runtime errors now return a non-zero exit code

@codecov
Copy link

codecov bot commented Aug 9, 2022

Codecov Report

Merging #2133 (cebc7bb) into main (6f4115d) will decrease coverage by 0.03%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main    #2133      +/-   ##
==========================================
- Coverage   42.46%   42.42%   -0.04%     
==========================================
  Files          94       94              
  Lines        7840     7846       +6     
==========================================
  Hits         3329     3329              
- Misses       4253     4259       +6     
  Partials      258      258              

@github-actions
Copy link

github-actions bot commented Aug 9, 2022

Integration tests success for
[83289f1]
(https://github.com/ossf/scorecard/actions/runs/2827587250)

Copy link
Contributor

@azeemshaikh38 azeemshaikh38 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with comment. Thanks for picking this up @spencerschrock!

checks/webhook.go Outdated Show resolved Hide resolved
@spencerschrock spencerschrock temporarily deployed to integration-test August 10, 2022 20:32 Inactive
@github-actions
Copy link

Integration tests success for
[eff8570]
(https://github.com/ossf/scorecard/actions/runs/2835516585)

@spencerschrock spencerschrock temporarily deployed to integration-test August 15, 2022 18:58 Inactive
@github-actions
Copy link

Integration tests success for
[e3177f7]
(https://github.com/ossf/scorecard/actions/runs/2840940526)

@spencerschrock spencerschrock temporarily deployed to integration-test August 15, 2022 20:27 Inactive
@azeemshaikh38 azeemshaikh38 enabled auto-merge (squash) August 15, 2022 20:28
@github-actions
Copy link

Integration tests success for
[cebc7bb]
(https://github.com/ossf/scorecard/actions/runs/2863297995)

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

Successfully merging this pull request may close these issues.

Feature scorecard exits with non-zero status when internal errors occur
2 participants