feat: add side effects detect #580
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create an issue in rspack-website when a PR with the "need documentation" label is merged | |
name: Need Documentation | |
on: | |
pull_request: | |
types: [labeled] | |
jobs: | |
check_label: | |
name: Check Label | |
runs-on: ubuntu-latest | |
steps: | |
- run: echo "Label ${{github.event.pull_request.merged}} ${{github.event.label.name}}" | |
doc: | |
name: Need Documentation | |
runs-on: ubuntu-latest | |
if: ${{ (github.event.label.name == 'need documentation') && contains(github.event.pull_request.labels.*.name, 'need documentation') }} | |
steps: | |
- uses: actions/github-script@v6 | |
with: | |
github-token: ${{ secrets.RSPACK_WEBSITE_ACCESS_TOKEN }} | |
script: | | |
const title = "Document rspack change: " + context.payload.pull_request.title; | |
const body = "See pull request:\n* " + context.payload.pull_request.html_url; | |
console.log(title); | |
console.log(body); | |
const result = await github.rest.issues.create({ | |
owner: 'web-infra-dev', | |
repo: 'rspack-website', | |
title: title, | |
body: body, | |
}); | |
console.log(result); |