test: add useDebounce integration tests and state management docs (#489 #490 #496) #9
Workflow file for this run
This file contains hidden or 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
| name: PR Target Check | |
| on: | |
| pull_request_target: | |
| branches: | |
| - main | |
| jobs: | |
| warn-wrong-target: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pull-requests: write | |
| steps: | |
| - name: Comment and close PR targeting main | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| await github.rest.issues.createComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: context.issue.number, | |
| body: `👋 Hey @${context.payload.pull_request.user.login}, thanks for your contribution!\n\n` + | |
| `This PR is targeting \`main\` directly. We use \`main\` for stable releases only — ` + | |
| `all contributions should be opened against the \`dev\` branch instead.\n\n` + | |
| `**Please close this PR and reopen it with \`dev\` as the base branch.** ` + | |
| `If you're unsure how to do that, you can change the base branch using the *Edit* button at the top of this PR page.\n\n` + | |
| `Closing this PR automatically. See you in \`dev\`! 🚀` | |
| }); | |
| await github.rest.pulls.update({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| pull_number: context.payload.pull_request.number, | |
| state: 'closed' | |
| }); |