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

feat: support GitHub enterprise api #197

Merged

Conversation

ricardojdsilva87
Copy link
Contributor

@ricardojdsilva87 ricardojdsilva87 commented Oct 28, 2024

Pull Request

Proposed Changes

This Pull request is based on the already merged github/evergreen#256 to give support to GitHub Enterprise login using a GitHub App also created on GitHub Enterprise

Apart of the necessary changes on the auth.py file to support this feature, some minor changes were added to this PR, the
.coveragerc file was also added to ignore test files for code coverage, with this change the code coverage went below 80% so a few more tests were added.

Code coverage

---------- coverage: platform darwin, python 3.13.0-final-0 ----------
Name                   Stmts   Miss  Cover   Missing
----------------------------------------------------
auth.py                   28      4    86%   48, 78-80
contributor_stats.py      47     13    72%   58, 142-177
contributors.py           63     20    68%   17-87, 172-173, 190-193, 199
env.py                    53      2    96%   43-44
json_writer.py             5      0   100%
markdown.py               66     13    80%   84, 120, 123-124, 167, 183-193
----------------------------------------------------
TOTAL                    262     52    80%

Required test coverage of 80% reached. Total coverage: 80.15%

Tested against a repository on GHE enterprise the code created a contributors.json and contributors.md file

Readiness Checklist

Author/Contributor

  • If documentation is needed for this change, has that been included in this pull request
  • run make lint and fix any issues that you have introduced
  • run make test and ensure you have test coverage for the lines you are introducing
  • If publishing new data to the public (scorecards, security scan results, code quality results, live dashboards, etc.), please request review from @jeffrey-luszcz

Reviewer

  • Label as either bug, documentation, enhancement, infrastructure, maintenance or breaking

@ricardojdsilva87 ricardojdsilva87 changed the title Feat/support GitHub enterprise api feat/support GitHub enterprise api Oct 28, 2024
@ricardojdsilva87 ricardojdsilva87 changed the title feat/support GitHub enterprise api feat: support GitHub enterprise api Oct 28, 2024
Copy link
Member

@jmeridth jmeridth left a comment

Choose a reason for hiding this comment

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

Couple things. This looks great. Thank you for the PR.

.coveragerc Outdated Show resolved Hide resolved
.env-example Outdated Show resolved Hide resolved
auth.py Outdated Show resolved Hide resolved
contributors.py Outdated Show resolved Hide resolved
jmeridth
jmeridth previously approved these changes Oct 29, 2024
auto-merge was automatically disabled October 29, 2024 09:34

Head branch was pushed to by a user without write access

@jmeridth jmeridth merged commit 90922d5 into github:main Oct 30, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants