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

🐛 Use leveled scoring for Code Review check #2542

Merged
merged 5 commits into from
Jan 11, 2023

Conversation

raghavkaul
Copy link
Contributor

What kind of change does this PR introduce?

Update the Code-Review check to better account for bot activity
Also updates Raw Results.

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

  • Scoring changes: Leveled scoring
    • If any changes haven't been reviewed, reduce score by 7 points
      • If multiple changes haven't been reviewed, give a minimum score
    • If any bot changes that haven't been reviewed, reduce score by 3 points
  • If the only activity found on a repo is bot commit activity, scoring is inconclusive.
  • Tests for the changes have been added (for bug fixes/features)

Which issue(s) this PR fixes

Fixes #2450.
Fixes #2302.

Does this PR introduce a user-facing change?

Code-Review check uses leveled scoring
Code-Review check returns inconclusive results when recent activity is solely made up of bot commits

* Update clients
* Update scoring

Signed-off-by: Raghav Kaul <raghavkaul@google.com>
@codecov
Copy link

codecov bot commented Dec 14, 2022

Codecov Report

Merging #2542 (f447122) into main (ed9576c) will increase coverage by 0.17%.
The diff coverage is 65.51%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2542      +/-   ##
==========================================
+ Coverage   40.03%   40.20%   +0.17%     
==========================================
  Files         122      122              
  Lines        9866     9896      +30     
==========================================
+ Hits         3950     3979      +29     
- Misses       5635     5636       +1     
  Partials      281      281              

@github-actions
Copy link

Integration tests success for
[3e91332]
(https://github.com/ossf/scorecard/actions/runs/3690791421)

Copy link
Contributor

@laurentsimon laurentsimon left a comment

Choose a reason for hiding this comment

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

Thanks. LGTM. Added a few comments.

clients/githubrepo/graphql.go Show resolved Hide resolved
checks/evaluation/code_review_test.go Show resolved Hide resolved
pkg/json_raw_results.go Show resolved Hide resolved
docs/checks.md Outdated Show resolved Hide resolved
@raghavkaul raghavkaul temporarily deployed to integration-test December 17, 2022 01:23 — with GitHub Actions Inactive
@raghavkaul raghavkaul temporarily deployed to integration-test December 17, 2022 01:28 — with GitHub Actions Inactive
@github-actions
Copy link

Integration tests success for
[75920f9]
(https://github.com/ossf/scorecard/actions/runs/3717783873)

@github-actions
Copy link

Integration tests success for
[44d0e02]
(https://github.com/ossf/scorecard/actions/runs/3717805590)

Copy link
Contributor

@spencerschrock spencerschrock left a comment

Choose a reason for hiding this comment

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

Overall looks good.

e2e/code_review_test.go Outdated Show resolved Hide resolved
@github-actions
Copy link

Stale pull request message

* Test coverage
* Docs
* Raw results

Signed-off-by: Raghav Kaul <raghavkaul@google.com>
auto-merge was automatically disabled January 3, 2023 18:26

Head branch was pushed to by a user without write access

@raghavkaul raghavkaul temporarily deployed to integration-test January 3, 2023 18:26 — with GitHub Actions Inactive
@laurentsimon laurentsimon enabled auto-merge (squash) January 3, 2023 18:37
@laurentsimon laurentsimon self-requested a review January 3, 2023 18:37
@github-actions
Copy link

github-actions bot commented Jan 3, 2023

Integration tests success for
[3c1727c]
(https://github.com/ossf/scorecard/actions/runs/3832005366)

@raghavkaul
Copy link
Contributor Author

Some unit test failures, looking

Copy link
Contributor

@spencerschrock spencerschrock left a comment

Choose a reason for hiding this comment

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

Thanks for pinning the E2E test

@raghavkaul raghavkaul temporarily deployed to integration-test January 9, 2023 19:30 — with GitHub Actions Inactive
@github-actions
Copy link

github-actions bot commented Jan 9, 2023

Integration tests success for
[210d67d]
(https://github.com/ossf/scorecard/actions/runs/3877075205)

@laurentsimon laurentsimon temporarily deployed to integration-test January 10, 2023 18:54 — with GitHub Actions Inactive
@github-actions
Copy link

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

@laurentsimon laurentsimon merged commit bf516e1 into ossf:main Jan 11, 2023
raghavkaul added a commit to raghavkaul/scorecard that referenced this pull request Feb 9, 2023
* Ignore bot commits when calculating Code Review score

* Update clients
* Update scoring

Signed-off-by: Raghav Kaul <raghavkaul@google.com>

* Address PR comments

* Test coverage
* Docs
* Raw results

Signed-off-by: Raghav Kaul <raghavkaul@google.com>

Signed-off-by: Raghav Kaul <raghavkaul@google.com>
raghavkaul added a commit to raghavkaul/scorecard that referenced this pull request Apr 4, 2023
* Ignore bot commits when calculating Code Review score

* Update clients
* Update scoring

Signed-off-by: Raghav Kaul <raghavkaul@google.com>

* Address PR comments

* Test coverage
* Docs
* Raw results

Signed-off-by: Raghav Kaul <raghavkaul@google.com>

Signed-off-by: Raghav Kaul <raghavkaul@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants