Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save acumenix/ad68f7fba79d587682f13e5d83195e26 to your computer and use it in GitHub Desktop.
Save acumenix/ad68f7fba79d587682f13e5d83195e26 to your computer and use it in GitHub Desktop.
How to query GitHub's audit log with GraphQL
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