-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (50 loc) · 1.68 KB
/
labelIssues.yml
File metadata and controls
50 lines (50 loc) · 1.68 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Label issues
'on':
issues:
types:
- reopened
- opened
schedule:
- cron: '0 */4 * * *' # Runs every day 4 hours
jobs:
label-issues:
runs-on: ubuntu-latest
if: github.event_name == 'issues'
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: '18'
- name: Install dependencies
run: npm install
- name: Label Issues
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
GITHUB_ISSUE_NUMBER: '${{github.event.issue.number }}'
GITHUB_REPOSITORY_NAME: '${{github.event.repository.name }}'
PAT_TOKEN: '${{ secrets.PAT_TOKEN1 }}'
API_KEY: '${{ secrets.OPENAI_API_KEY }}'
MAIL_APP_PASSWORD: '${{ secrets.MAIL_APP_PASSWORD }}'
run: |
npm install @octokit/rest
npm install axios
npm install nodemailer
node label-issues.js
stale-issues:
runs-on: ubuntu-latest
if: github.event_name == 'schedule'
steps:
- name: Use stale action
uses: actions/stale@v8
with:
repo-token: ${{ secrets.PAT_TOKEN1 }}
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.'
close-issue-message: 'This issue was closed because it has been stalled for 1 day with no activity.'
days-before-issue-stale: 2
days-before-issue-close: 1
stale-issue-label: 'stale'
- name: echo in console
run: |
echo "Hello world schedule!"