diff --git a/.github/workflows/plumber.yml b/.github/workflows/plumber.yml new file mode 100644 index 00000000..40e8ec0b --- /dev/null +++ b/.github/workflows/plumber.yml @@ -0,0 +1,34 @@ +name: Plumber + +on: + push: + branches: [main] + pull_request: + +permissions: + contents: read + +jobs: + plumber: + runs-on: ubuntu-latest + timeout-minutes: 10 + permissions: + contents: read + security-events: write + # Needed by score-push to publish the score for the README badge. + id-token: write + steps: + - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0 + + - uses: getplumber/plumber@7ad9d267ee5a00163cec9e5c749a088d5f565167 # v0.4.26 + with: + # Code scanning upload needs security-events write, which PRs + # from forks do not get. The report stays available as a + # workflow artifact there. + upload-sarif: ${{ github.event.pull_request.head.repo.fork != true }} + # Publishes the score to score.getplumber.io, which feeds the + # badge in the README. A failed push never fails the run. + score-push: true + # Gate at 85 points instead of the all-or-nothing default, + # leaves room for a small finding without blocking PRs. + min-points: 85 diff --git a/.plumber.yaml b/.plumber.yaml new file mode 100644 index 00000000..16ad4356 --- /dev/null +++ b/.plumber.yaml @@ -0,0 +1,14 @@ +# Plumber overlay: inherits every control from the CLI's built-in +# baseline, only the differences for this repo are written here. +# Run 'plumber config resolve' to see the full effective config. +extends: plumber:default +version: '2.0' + +github: + controls: + # Off for now: the release jobs restore the npm cache through + # setup-node on release triggers. Scoping the cache key to the + # release ref (or skipping the cache on publish) is a good + # follow-up, but it is its own change. + releaseWorkflowsMustNotRestoreUntrustedCache: + enabled: false diff --git a/README.md b/README.md index e8076b9c..c4d5545a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # React Components for the Google Maps JavaScript API [![MIT License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/visgl/react-google-maps/tree/main/LICENSE) +[![Plumber Score](https://score.getplumber.io/github.com/visgl/react-google-maps.svg)](https://score.getplumber.io/github.com/visgl/react-google-maps) This is a TypeScript / JavaScript library to integrate the Maps JavaScript API into your React application.