Skip to content

chore: dom func

chore: dom func #56

Workflow file for this run

name: Pull Request Labeled
on:
pull_request_target:
types: [labeled]
permissions:
contents: read
issues: write
pull-requests: write
jobs:
invalid:
runs-on: ubuntu-latest
if: "${{ github.event.label.name == 'Resolution: Invalid'}}"
steps:
- name: Reply to Pull Request
uses: peter-evans/create-or-update-comment@v3
with:
issue-number: ${{ github.event.number }}
body: |
We are happy to see you're contributing to fastjs, but we are unable to merge this pull request for now, because of:
- This pull request does not fix a bug.
- This pull request need to have some changes.
- This pull request doesn't have a valid issue.
- You did not follow our [Contributing Guidelines](https://docs.fastjs.dev/other/contributing.html).
- This pull request violates our [Code of Conduct](https://docs.fastjs.dev/other/code-of-conduct.html).
- Other reasons.
- name: Close Pull Request
uses: actions/github-script@v7
if: "${{ github.event.pull_request.state == 'open'}}"
with:
script: |
const pr = context.payload.pull_request;
const label = context.payload.label;
if (label.name === 'Resolution: Invalid') {
github.rest.pulls.update({
pull_number: pr.number,
owner: context.repo.owner,
repo: context.repo.repo,
state: 'closed'
});
}