| name: Merged PR stats |
| |
| on: |
| pull_request_target: |
| branches: |
| - main |
| - v*-branch |
| types: [closed] |
| |
| permissions: |
| contents: read |
| |
| jobs: |
| record_merged: |
| if: github.event.pull_request.merged == true && github.repository == 'zephyrproject-rtos/zephyr' |
| runs-on: ubuntu-24.04 |
| timeout-minutes: 15 |
| steps: |
| - name: checkout |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| with: |
| persist-credentials: false |
| ref: ${{ github.event.pull_request.base.sha }} |
| sparse-checkout: | |
| scripts/ci/stats/merged_prs.py |
| scripts/requirements-actions.txt |
| |
| - name: Set up Python |
| uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 |
| with: |
| python-version: 3.12 |
| cache: pip |
| cache-dependency-path: scripts/requirements-actions.txt |
| |
| - name: Install Python packages |
| run: | |
| pip install -r scripts/requirements-actions.txt --require-hashes |
| |
| - name: PR event |
| env: |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| ELASTICSEARCH_KEY: ${{ secrets.ELASTICSEARCH_KEY }} |
| ELASTICSEARCH_SERVER: "https://elasticsearch.zephyrproject.io:443" |
| PR_STAT_ES_INDEX: ${{ vars.PR_STAT_ES_INDEX }} |
| run: | |
| python3 ./scripts/ci/stats/merged_prs.py --pull-request ${{ github.event.pull_request.number }} --repo ${{ github.repository }} |