Skip to content

Commit

Permalink
working on fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jca27 committed Jan 9, 2025
1 parent c4f1b07 commit d05f357
Showing 1 changed file with 26 additions and 3 deletions.
29 changes: 26 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,34 @@ runs:
- name: Run linting rules and tests
uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20

- name: Get Dependabot Alerts
shell: bash
run: npm run get-dependabot-alerts
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
let page = 1;
let allAlerts = [];
while (true) {
const { data: alerts } = await github.rest.dependabot.listAlertsForRepo({
owner: context.repo.owner,
repo: context.repo.repo,
per_page: 100,
page,
state: "open"
});
if (alerts.length === 0) break;
allAlerts = allAlerts.concat(alerts);
page++;
}
console.log(`Fetched ${allAlerts.length} total alerts for ${{ github.repository}}.`);
fs.writeFileSync('alerts.json', JSON.stringify(allAlerts, null, 2));
- name: Create Tickets
shell: bash
Expand Down

0 comments on commit d05f357

Please sign in to comment.