Skip to content

chore: add ESLint configuration #5

chore: add ESLint configuration

chore: add ESLint configuration #5

name: Pull Request Contributor Welcome

Check warning on line 1 in .github/workflows/pr-contributor-welcome.yml

View workflow run for this annotation

GitHub Actions / Pull Request Contributor Welcome

Workflow execution policy warning (evaluate mode)

On November 2, 2026, GitHub will restrict `pull_request_target` on public repositories by default. To continue allowing the event trigger, configure an Actions policy. Learn more: https://gh.io/securely-using-pull_request_target#default-policy-for-pull_request_target
on:
pull_request_target:
types:
- closed
# paths:
# - 'components/**'
permissions:
contents: read
jobs:
comment:
permissions:
issues: write # for actions-cool/maintain-one-comment to modify or create issue comments
pull-requests: write # for actions-cool/maintain-one-comment to modify or create PR comments
if: github.event.pull_request.merged == true && github.repository == '{owner}/{repo}'
runs-on: ubuntu-latest
steps:
- name: get commit count
id: get_commit_count
run: |
PR_AUTHOR=$(echo "${{ github.event.pull_request.user.login }}")
RESULT_DATA=$(curl -s "https://api.github.com/repos/${{ github.repository }}/commits?author=${PR_AUTHOR}&per_page=5")
DATA_LENGTH=$(echo $RESULT_DATA | jq 'if type == "array" then length else 0 end')
echo "COUNT=$DATA_LENGTH" >> $GITHUB_OUTPUT
- name: Comment on PR
if: steps.get_commit_count.outputs.COUNT < 3
uses: actions-cool/maintain-one-comment-backup@fbbc22ad1809c1bcf46f19b58397b6254773588c
with:
token: ${{ secrets.GITHUB_TOKEN }}
body: |
🎉 Thx for the PR @${{ github.event.pull_request.user.login }}
<!-- WELCOME_CONTRIBUTION -->
body-include: <!-- WELCOME_CONTRIBUTION -->