Created
June 6, 2019 22:11
-
-
Save jonico/abf33f4bf642bdceca197b9e0ee1de15 to your computer and use it in GitHub Desktop.
How to query GitHub's audit log with GraphQL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
query { | |
organization(login: "se-saml") { | |
auditLog(first: 50) { | |
edges { | |
node { | |
... on RepositoryAuditEntryData { | |
repository { | |
name | |
} | |
} | |
... on OrganizationAuditEntryData { | |
organization { | |
name | |
} | |
} | |
... on TeamAuditEntryData { | |
teamName | |
} | |
... on BusinessAuditEntryData { | |
businessUrl | |
} | |
... on OauthApplicationAuditEntryData { | |
oauthApplicationName | |
} | |
... on AuditEntry { | |
actorResourcePath | |
action | |
actorIp | |
actorLogin | |
createdAt | |
actorLocation { | |
countryCode | |
country | |
regionCode | |
region | |
city | |
} | |
} | |
} | |
cursor | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you for the detailed query. I wanted to know How can I search for specific log like RepositoryVisibilityChangeEnableAuditEntry and RepositoryVisibilityChangeEnableAuditEntry?