Skip to content
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.

Commit

Permalink
Rename to ecosystem
Browse files Browse the repository at this point in the history
  • Loading branch information
rndev15 committed May 23, 2024
1 parent 82b84f2 commit c0f8551
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
# microsoft_teams_webhook: ${{ secrets.MICROSOFT_TEAMS_WEBHOOK }}
# slack_webhook: ${{ secrets.SLACK_WEBHOOK }}
# severity: low,medium
# manifest: path-one/,path-two/deeper/
# ecosystem: npm,rubygems
# count: 20
# pager_duty_integration_key: ${{ secrets.PAGER_DUTY_INTEGRATION_KEY }}
# zenduty_api_key: ${{ secrets.ZENDUTY_API_KEY }}
Expand Down
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ inputs:
default: 20
severity:
description: 'Comma separated list of severities. E.g. low,medium,high,critical (NO SPACES BETWEEN COMMA AND SEVERITY)'
manifest:
description: "A comma-separated list of full manifest paths. If specified, only alerts for these manifests will be returned."
ecosystem:
description: "A comma-separated list of ecosystems. If specified, only alerts for these ecosystems will be returned."
branding:
icon: 'alert-octagon'
color: 'red'
Expand Down
4 changes: 2 additions & 2 deletions src/fetch-alerts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const fetchAlerts = async (
repositoryName: string,
repositoryOwner: string,
severity: string,
manifest: string,
ecosystem: string,
count: number,
): Promise<Alert[] | []> => {
const octokit = new Octokit({
Expand All @@ -21,7 +21,7 @@ export const fetchAlerts = async (
repo: repositoryName,
state: 'open',
severity,
manifest,
ecosystem,
per_page: count,
})
const alerts: Alert[] = response.data.map((dependabotAlert) =>
Expand Down
4 changes: 2 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ async function run(): Promise<void> {
const emailTransportSmtpPassword = getInput('email_transport_smtp_password')
const count = parseInt(getInput('count'))
const severity = getInput('severity')
const manifest = getInput('manifest')
const ecosystem = getInput('ecosystem')
const { owner } = context.repo
const { repo } = context.repo
const alerts = await fetchAlerts(token, repo, owner, severity, manifest, count)
const alerts = await fetchAlerts(token, repo, owner, severity, ecosystem, count)
if (alerts.length > 0) {
if (microsoftTeamsWebhookUrl) {
await sendAlertsToMicrosoftTeams(microsoftTeamsWebhookUrl, alerts)
Expand Down

0 comments on commit c0f8551

Please sign in to comment.