diff --git a/.github/workflows/pr-risk.yml b/.github/workflows/pr-risk.yml new file mode 100644 index 000000000..8912bf774 --- /dev/null +++ b/.github/workflows/pr-risk.yml @@ -0,0 +1,34 @@ +name: PR Risk Experiment + +on: + pull_request: + types: [opened, synchronize, reopened, ready_for_review] + +permissions: + contents: read + pull-requests: read + +concurrency: + group: pr-risk-${{ github.event.pull_request.number }} + cancel-in-progress: true + +jobs: + risk: + name: Score PR risk + runs-on: ubuntu-latest + if: github.event.pull_request.draft == false + + steps: + - name: Score current PR + uses: getsentry/pr-risk-action@v0 + with: + repo: ${{ github.repository }} + pr-number: ${{ github.event.pull_request.number }} + result-path: risk-pr-result.json + skip-reviews: "true" + + - name: Upload risk result + uses: actions/upload-artifact@v4 + with: + name: risk-pr-result + path: risk-pr-result.json