-
Notifications
You must be signed in to change notification settings - Fork 2
35 lines (30 loc) · 980 Bytes
/
issue_check.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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'
})