Skip to content

Conversation

lharrison13
Copy link
Contributor

@lharrison13 lharrison13 commented Apr 28, 2025

What kind of change does this PR introduce?

What is the current behavior?

Currently the getContributors function only returns the contributors to the repo.

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

Now the getContributors function also returns the users listed in the repo's CODEOWNERS file.

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

Which issue(s) this PR fixes

Contributes to #3931

See here for discussion #4551 (comment)

Special notes for your reviewer

I also tried to solve the issue of "verified external contributors" by allowing users to add an # @verified comment to their CODEOWNERS file along with the user names of the verified external contributors as per #3931 (comment).

Lastly to parse the CODEOWNERS file I am using this package by @hmarr. I can manually parse it with regex but this was pretty easy to use and made things a lot simpler.

Does this PR introduce a user-facing change?

NONE

users listed in CODEOWNERS file in GitHub repos now contribute to Contributors check

Signed-off-by: Luke Harrison <Luke.Harrison1@ibm.com>
@lharrison13 lharrison13 requested a review from a team as a code owner April 28, 2025 11:43
@lharrison13 lharrison13 requested review from justaugustus and spencerschrock and removed request for a team April 28, 2025 11:43
Copy link

codecov bot commented Apr 28, 2025

Codecov Report

Attention: Patch coverage is 43.42105% with 43 lines in your changes missing coverage. Please review.

Project coverage is 68.27%. Comparing base (353ed60) to head (82a281f).
Report is 171 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4611      +/-   ##
==========================================
+ Coverage   66.80%   68.27%   +1.46%     
==========================================
  Files         230      249      +19     
  Lines       16602    18874    +2272     
==========================================
+ Hits        11091    12886    +1795     
- Misses       4808     5129     +321     
- Partials      703      859     +156     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@spencerschrock
Copy link
Member

Taking a look this afternoon, would merging this close #4551 ?

@spencerschrock
Copy link
Member

/scdiff generate Contributors

Copy link

github-actions bot commented May 9, 2025

Copy link
Member

@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.

some initial thoughts in the time I had now

@lharrison13
Copy link
Contributor Author

Taking a look this afternoon, would merging this close #4551 ?

Yep we could also just close it now and work off of this. This is the simplified version of that with the changes you requested.

Signed-off-by: Luke Harrison <Luke.Harrison1@ibm.com>
Signed-off-by: Luke Harrison <Luke.Harrison1@ibm.com>
Copy link
Member

@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.

This still exports CodeOwnerPaths which needs to not be exported. But the change looks good. I'll add an action item to make that e2e test repo and ping this PR in a day or two.

@lharrison13
Copy link
Contributor Author

lharrison13 commented May 23, 2025

This still exports CodeOwnerPaths which needs to not be exported. But the change looks good. I'll add an action item to make that e2e test repo and ping this PR in a day or two.

I think I need to export it because I use it in 2 other files. I could duplicate it though so its not exported.

https://github.com/ossf/scorecard/pull/4611/files#diff-31e1ee0c52fdbfa08b1f646de83cdae712e6a9fbe98c0deabb38fa36e533c04bR227
and
https://github.com/ossf/scorecard/pull/4611/files#diff-12fff4b7d6f9e81e901a2b9db21f30e1f3fdda0bcb0e425151af983fbcf3559fR57

Signed-off-by: Luke Harrison <Luke.Harrison1@ibm.com>
Signed-off-by: Luke Harrison <Luke.Harrison1@ibm.com>
@spencerschrock
Copy link
Member

I think I need to export it because I use it in 2 other files

They're in the same package though, so should be visible still

Signed-off-by: Luke Harrison <Luke.Harrison1@ibm.com>
@lharrison13
Copy link
Contributor Author

lharrison13 commented May 23, 2025

I think I need to export it because I use it in 2 other files

They're in the same package though, so should be visible still

Oh you're right my bad!

@lharrison13 lharrison13 temporarily deployed to integration-test May 23, 2025 16:00 — with GitHub Actions Inactive
@spencerschrock spencerschrock merged commit f08e8fb into ossf:main May 27, 2025
37 of 38 checks passed
@spencerschrock
Copy link
Member

Thanks!

renewitt pushed a commit to renewitt/scorecard that referenced this pull request May 29, 2025
…rs check (ossf#4611)

* ✨ added github codeowners to contributors list

Signed-off-by: Luke Harrison <Luke.Harrison1@ibm.com>

* ✨ deduped code owners and contributors plus other fixes

Signed-off-by: Luke Harrison <Luke.Harrison1@ibm.com>

* ✨ index out of bounds check

Signed-off-by: Luke Harrison <Luke.Harrison1@ibm.com>

* ✨ fixed cog complexity linting error

Signed-off-by: Luke Harrison <Luke.Harrison1@ibm.com>

* ✨ updated e2e repo and rename file param

Signed-off-by: Luke Harrison <Luke.Harrison1@ibm.com>

* ✨ removed duplicate e2e test repo

Signed-off-by: Luke Harrison <Luke.Harrison1@ibm.com>

* ✨ removed export of github codeowner paths

Signed-off-by: Luke Harrison <Luke.Harrison1@ibm.com>

---------

Signed-off-by: Luke Harrison <Luke.Harrison1@ibm.com>
Signed-off-by: Rachael Newitt <renewitt@google.com>
renewitt pushed a commit to renewitt/scorecard that referenced this pull request May 29, 2025
…rs check (ossf#4611)

* ✨ added github codeowners to contributors list

Signed-off-by: Luke Harrison <Luke.Harrison1@ibm.com>

* ✨ deduped code owners and contributors plus other fixes

Signed-off-by: Luke Harrison <Luke.Harrison1@ibm.com>

* ✨ index out of bounds check

Signed-off-by: Luke Harrison <Luke.Harrison1@ibm.com>

* ✨ fixed cog complexity linting error

Signed-off-by: Luke Harrison <Luke.Harrison1@ibm.com>

* ✨ updated e2e repo and rename file param

Signed-off-by: Luke Harrison <Luke.Harrison1@ibm.com>

* ✨ removed duplicate e2e test repo

Signed-off-by: Luke Harrison <Luke.Harrison1@ibm.com>

* ✨ removed export of github codeowner paths

Signed-off-by: Luke Harrison <Luke.Harrison1@ibm.com>

---------

Signed-off-by: Luke Harrison <Luke.Harrison1@ibm.com>
Signed-off-by: Rachael Newitt <renewitt@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants