Skip to content

Check if user has starred the repository #9

Check if user has starred the repository

Check if user has starred the repository #9

Workflow file for this run

name: Check if user has starred the repository
on:
issues:
types: [opened]
jobs:
check-star:
runs-on: ubuntu-latest
steps:
- uses: gacts/is-stargazer@v1
id: check-star
- if: steps.check-star.outputs.is-stargazer != 'true'
uses: actions/github-script@v6
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '⭐ Please, star this repository!'
})
- if: ${{ steps.check-star.outputs.is-stargazer != 'true' && github.actor != 'github-actions[bot]' }}
uses: actions/github-script@v6
with:
script: |
github.rest.issues.update({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
state: 'closed'
})