Skip to content

GitHub Branch Protection Rules Queries Stopped Working #216

Answered by rgajason
rgajason asked this question in Q&A
Discussion options

You must be logged in to vote

EDIT :: Real answer is in the comment thread below. TL;DR: issue with CLI vs script.

In true fashion, I was able to get it sorta working in my very next test...

This fails:

repo = op.repository(owner="myorg", name="myrepo")
repo.branch_protection_rules(first=10)

But this works:

bprs = op.repository(owner="myorg", name="myrepo").branch_protection_rules(first=10)

This also fails:

bprs = op.repository(owner="myorg", name="myrepo").branch_protection_rules(first=10)
repo = op.repository(owner="myorg", name="myrepo")

The brps = assignment works but the following repo = assignment fails with:

ValueError: repository already have a selection repository(...)

Would be interested in thoughts on h…

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@barbieri
Comment options

@rgajason
Comment options

@rgajason
Comment options

@rgajason
Comment options

@barbieri
Comment options

Answer selected by rgajason
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants