Skip to content

Commit 7a3c0c3

Browse files
committed
fix cypher query
1 parent ce2d051 commit 7a3c0c3

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

docs/official-docs/opengraph/extensions/github/queries.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -661,6 +661,7 @@ Returns all repositories that have GitHub Actions workflows and an unprotected d
661661
MATCH p=(repo:GH_Repository)-[:GH_HasWorkflow]->(:GH_Workflow)
662662
MATCH p1=(repo)-[:GH_HasBranch]->(branch:GH_Branch)
663663
WHERE repo.default_branch = branch.short_name
664+
AND branch.protected = false
664665
RETURN p1
665666
LIMIT 1000
666667
```

docs/official-docs/opengraph/extensions/github/schema.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,4 +166,4 @@ This file is automatically generated from the [extension schema definition file]
166166
| [GH_WriteOrganizationCustomRepoRole](/opengraph/extensions/github/edges/gh_writeorganizationcustomreporole) || [Organization] Org role can write custom repo role definitions |
167167
| [GH_WriteOrganizationNetworkConfigurations](/opengraph/extensions/github/edges/gh_writeorganizationnetworkconfigurations) || [Organization] Org role can write network configurations |
168168
| [GH_WriteRepoContents](/opengraph/extensions/github/edges/gh_writerepocontents) || [Repository] Repo role can write repository contents |
169-
| [GH_WriteRepoPullRequests](/opengraph/extensions/github/edges/gh_writerepopullrequests) || [Repository] Repo role can create and merge pull requests |
169+
| [GH_WriteRepoPullRequests](/opengraph/extensions/github/edges/gh_writerepopullrequests) || [Repository] Repo role can create and merge pull requests |
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"name": "GitHub: Repositories with Workflows and Unprotected Default Branch",
3-
"query": "MATCH p=(repo:GH_Repository)-[:GH_HasWorkflow]->(:GH_Workflow)\nMATCH p1=(repo)-[:GH_HasBranch]->(branch:GH_Branch)\nWHERE repo.default_branch = branch.short_name\nRETURN p1\nLIMIT 1000",
3+
"query": "MATCH p=(repo:GH_Repository)-[:GH_HasWorkflow]->(:GH_Workflow)\nMATCH p1=(repo)-[:GH_HasBranch]->(branch:GH_Branch)\nWHERE repo.default_branch = branch.short_name\nAND branch.protected = false\nRETURN p1\nLIMIT 1000",
44
"description": "Returns all repositories that have GitHub Actions workflows and an unprotected default branch. This means that users with GH_WriteRepoContents to the Repository can overwrite or change the workflow."
55
}

0 commit comments

Comments
 (0)