Skip to content

Bump addressable from 2.6.0 to 2.10.0 #2

Bump addressable from 2.6.0 to 2.10.0

Bump addressable from 2.6.0 to 2.10.0 #2

name: Dependency Review
on:
pull_request:
workflow_dispatch:
inputs:
base-ref:
description: "Base ref to compare against (defaults to the repo's default branch)"
required: false
head-ref:
description: "Head ref to compare (defaults to the ref that triggered this run)"
required: false
permissions:
contents: read
pull-requests: write
jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v7
- name: Dependency Review
uses: actions/dependency-review-action@v5
with:
fail-on-severity: high
license-check: false
show-openssf-scorecard: false
comment-summary-in-pr: ${{ github.event_name == 'pull_request' && 'always' || 'never' }}
base-ref: ${{ github.event.inputs.base-ref || github.event.repository.default_branch }}
head-ref: ${{ github.event.inputs.head-ref || github.ref }}
- name: Tidy up zero-vulnerability comment wording
if: github.event_name == 'pull_request'
uses: actions/github-script@v9
with:
script: |
const marker = '<!-- dependency-review-pr-comment-marker -->';
const needle = 'The following issues were found:<ul><li>✅ 0 vulnerable package(s)</li></ul>';
const replacement = '✅ No vulnerable packages introduced.';
const { data: comments } = await github.rest.issues.listComments({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
});
const comment = comments.find(c => c.body.includes(marker) && c.body.includes(needle));
if (!comment) return;
await github.rest.issues.updateComment({
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: comment.id,
body: comment.body.replace(needle, replacement),
});