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 #225

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ricardojdsilva87
Copy link

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

  • Split the authentication to a separate file
  • Added needed tests

Code coverage

---------- coverage: platform darwin, python 3.13.0-final-0 ----------
Name             Stmts   Miss  Cover   Missing
----------------------------------------------
auth.py             16      1    94%   47
stale_repos.py     151     16    89%   142-143, 184-185, 200-201, 224, 326, 328, 335-336, 394-395, 402-403, 413
----------------------------------------------
TOTAL              167     17    90%

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

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 fix, documentation, enhancement, infrastructure, maintenance or breaking

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.

One import question. Nice break out of the auth content.

@@ -1,12 +1,15 @@
#!/usr/bin/env python
""" Find stale repositories in a GitHub organization. """
from __future__ import annotations
Copy link
Member

Choose a reason for hiding this comment

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

why do we need this?

Copy link
Author

Choose a reason for hiding this comment

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

Hello @jmeridth,
I've tried this because of this error on the pipeline:
https://github.com/github/stale-repos/actions/runs/11576316507/job/32229613440#step:5:38
It seems that it's not the best approach since it still fails. I haven't looked into the other repositories to check what might be the difference because the code between them is the same

Copy link
Member

Choose a reason for hiding this comment

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

I think it may be time to drop support for python v3.9 like we have for our other actions.

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

Successfully merging this pull request may close these issues.

3 participants