Skip to content

Conversation

@jbristow
Copy link
Contributor

Summary of Change

Add a new client call to grab the branch protection for a given branch on a repo.

Before Review

  • Unit Tests are Added/Updated and meet at-least 85% coverage criteria for that feature

Before Merge

  • Ran/Functionally Tested in Dev Environment
  • Documentation Is Updated (Where Appropriate)

@github-actions
Copy link
Contributor

github-actions bot commented Oct 29, 2025

Coverage

Coverage Report
FileStmtsMissCoverMissing
nodestream_github
   audit.py55296%80–83
   plugin.py4175%6
   repos.py94397%37, 81, 85
   teams.py34197%63
   users.py26196%33
nodestream_github/client
   githubclient.py2653686%91–92, 97–98, 191, 209, 252, 269, 335–336, 352–353, 415–416, 436–437, 472–473, 494–495, 507–508, 528–529, 538–540, 567–568, 588–589, 599–601, 618–619
nodestream_github/transformer
   repo.py42198%43
TOTAL6494593% 

Tests Skipped Failures Errors Time
75 0 💤 0 ❌ 0 🔥 4.127s ⏱️

)

def get_enterprise_audit_logs(self, *, search_phrase: Optional[str], **kwargs: Any):
def get_enterprise_audit_logs(self, *, search_phrase: str | None, **kwargs: Any):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

new ruff did this

Choose a reason for hiding this comment

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

Much better

match e:
case httpx.HTTPStatusError(response=response) if (
response.status_code == 404
):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

don't WARN on 404, since that's normal if branch protection is not enabled.

@jbristow jbristow merged commit d59b317 into master Oct 29, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants