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

✨ implement ListContributors for Azure DevOps #4437

Merged
merged 3 commits into from
Dec 10, 2024

Conversation

JamieMagee
Copy link
Contributor

What kind of change does this PR introduce?

Feature

What is the current behavior?

LisContributors throws an unsupported error on Azure DevOps

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

LisContributors is implemented for Azure DevOps

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

Which issue(s) this PR fixes

Next step of #4177

Special notes for your reviewer

I am a little unsure what to put for Companies or Organizations. For now, I've defaulted to the current Azure DevOps organization.

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

implement `ListContributors` for Azure DevOps

@JamieMagee JamieMagee requested a review from a team as a code owner December 5, 2024 01:18
@JamieMagee JamieMagee requested review from justaugustus and spencerschrock and removed request for a team December 5, 2024 01:18
@JamieMagee
Copy link
Contributor Author

The Contributors check now passes. Albeit with unexpected results, as I'm not sure what to choose for Companies or Organizations.

Details
$ env SCORECARD_EXPERIMENTAL=1 go run . --repo dev.azure.com/jamiemagee/jamiemagee/_git/scorecard --checks Contributors
Starting [Contributors]
Finished [Contributors]

RESULTS
-------
Aggregate score: 3.0 / 10

Check scores:
|--------|--------------|--------------------------------|-------------------------------------------------------------------------|
| SCORE  |     NAME     |             REASON             |                        DOCUMENTATION/REMEDIATION                        |
|--------|--------------|--------------------------------|-------------------------------------------------------------------------|
| 3 / 10 | Contributors | project has 1 contributing     | https://github.com/ossf/scorecard/blob/main/docs/checks.md#contributors |
|        |              | companies or organizations --  |                                                                         |
|        |              | score normalized to 3          |                                                                         |
|--------|--------------|--------------------------------|-------------------------------------------------------------------------|

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.

The Contributors check now passes. Albeit with unexpected results, as I'm not sure what to choose for Companies or Organizations.

It may be difficult to get meaningful data for this check since everything is inherently contained in a single organization?

clients/azuredevopsrepo/contributors.go Outdated Show resolved Hide resolved
Signed-off-by: Jamie Magee <[email protected]>
@JamieMagee
Copy link
Contributor Author

It may be difficult to get meaningful data for this check since everything is inherently contained in a single organization?

Exactly. It also returns nonsensical results for imported repositories. A better check might be using email domain to determine organization association. What do you think?

Copy link

codecov bot commented Dec 5, 2024

Codecov Report

Attention: Patch coverage is 61.40351% with 22 lines in your changes missing coverage. Please review.

Project coverage is 68.52%. Comparing base (353ed60) to head (d94ab0f).
Report is 72 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4437      +/-   ##
==========================================
+ Coverage   66.80%   68.52%   +1.71%     
==========================================
  Files         230      241      +11     
  Lines       16602    17938    +1336     
==========================================
+ Hits        11091    12292    +1201     
- Misses       4808     4843      +35     
- Partials      703      803     +100     

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.

A better check might be using email domain to determine organization association. What do you think?

This was also suggested in #4415 for GitLab, let's talk about this tomorrow Thursday at the community meeting.

@spencerschrock spencerschrock enabled auto-merge (squash) December 10, 2024 23:44
@spencerschrock spencerschrock merged commit b0dfb70 into ossf:main Dec 10, 2024
38 checks passed
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