Skip to content

Label issues

Label issues #1288

Workflow file for this run

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!"