hubcaps icon indicating copy to clipboard operation
hubcaps copied to clipboard

Support Code Scanning APIs

Open GeekMasher opened this issue 2 years ago • 0 comments

💡 Feature description

Supporting the GitHub Code Scanning API would allow us to automatically pull security alerts from GitHub and perform actions on those results.

https://docs.github.com/en/enterprise-cloud@latest/rest/code-scanning#list-code-scanning-alerts-for-a-repository

💻 Basic example

let owner = "softprops";
let repo = "hubcaps";

let alerts: Vec<CodeScanningAlerts> = github.repo(owner, repo).code_scanning().alerts().await?;

for alert in alerts {
    println!(" >> Alert('{:#?}')", alert.rule.name);
}

GeekMasher avatar Aug 09 '22 11:08 GeekMasher