java – Github GraphQL API branch search with regex
I’m trying to get branch protection rules for certain branches only, following a regex pattern.
As it doesn’t seem possible through REST API I’m switching to GraphQL API, but as a newbie I’m struggling to forge a correct query.
Is it even possible ?
edit : Here’s an example of what I’m trying to get
query Repository {
repository(name: "test", owner: "biologeek") {
refs(refPrefix: "refs/heads/", first: 99, query: { regex: "feature/*" }) {
nodes {
branchProtectionRule {
id
pushAllowances(last: 99) {
nodes {
actor {
... on User {
email
login
name
}
}
}
}
}
name
prefix
}
}
}
}
Read more here: Source link
