Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
kunalnagar committed Aug 4, 2024
1 parent 9e86dbd commit 194c7e4
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/fetch-alerts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ export const fetchAlerts = async (
): Promise<Alert[] | []> => {
const octokit = new Octokit({
auth: gitHubPersonalAccessToken,
})
const response = await octokit.request(
'GET /repos/{owner}/{repo}/dependabot/alerts',
{
owner: repositoryOwner,
repo: repositoryName,
state: 'open',
severity: severity.length > 0 ? severity : undefined,
ecosystem: ecosystem.length > 0 ? ecosystem : undefined,
per_page: count,
request: {
fetch,
},
)
})
const response = await octokit.dependabot.listAlertsForRepo({
owner: repositoryOwner,
repo: repositoryName,
state: 'open',
severity: severity.length > 0 ? severity : undefined,
ecosystem: ecosystem.length > 0 ? ecosystem : undefined,
per_page: count,
})
const alerts: Alert[] = response.data.map((dependabotAlert) =>
toAlert(dependabotAlert, repositoryName, repositoryOwner),
)
Expand Down

0 comments on commit 194c7e4

Please sign in to comment.