chore(ci): Adjust pumpkin-plugin-wit CI workflows (#3454)

* chore(ci): Adjust `pumpkin-plugin-wit` CI workflows

* Fix close-prs workflow

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Signed-off-by: Demetrius Kanios <demetrius@kanios.net>

---------

Signed-off-by: Demetrius Kanios <demetrius@kanios.net>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
Demetrius Kanios 2026-09-16 10:19:15 -07:00 committed by GitHub
parent 1ad73fff1e
commit bbd7690dd1
2 changed files with 31 additions and 12 deletions

28
.github/workflows/close-prs.yml vendored Normal file
View File

@ -0,0 +1,28 @@
name: Close PRs
on:
pull_request_target:
types: [opened, reopened]
workflow_dispatch:
permissions:
pull-requests: write
jobs:
manage-prs:
runs-on: ubuntu-slim
steps:
- name: "Close PR(s)"
run: |
if [ "${{ github.event_name }}" = "pull_request" ]; then
echo "${{ github.event.pull_request.number }}"
else
gh pr list --state open --limit 200 --json number --jq '.[].number'
fi | while read pr; do
if [ -n "$pr" ]; then
echo "Closing PR #$pr"
gh pr close $pr --comment "This repository does not accept direct pull requests. See #44 for details."
fi
done
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -1,20 +1,11 @@
name: Test `wit-bindgen` against the WIT name: Test `wit-bindgen` against the WIT
on: [push, pull_request, workflow_dispatch] on: [push, pull_request, workflow_dispatch]
permissions:
contents: write
pull-requests: write
jobs: jobs:
test-bindgen: test-bindgen:
name: Test with `wit-bindgen` name: Test with `wit-bindgen`
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - uses: actions/checkout@v7
uses: actions/checkout@v7 - uses: bytecodealliance/actions/wit-bindgen/setup@v1
- run: wit-bindgen rust v0.1
- name: Setup `wit-bindgen`
uses: bytecodealliance/actions/wit-bindgen/setup@v1
- name: Test WIT
run: wit-bindgen rust v0.1