Skip to content

Shift to yaml

Shift to yaml #12

Workflow file for this run

name: Pull Request Open
on:
workflow_dispatch:
pull_request:
types:
- opened
- reopened
jobs:
PR-Open:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 14
- name: Install project dependencies
run: |
npm install
npm install axios
- name: Analyze Pull Request
run: |
PULL_MSG=$(node .github/scripts/pr-analyzer.js)
echo "PULL_MSG=$PULL_MSG" >> $GITHUB_ENV
env:
PR_NUMBER: ${{ github.event.number }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: actions/github-script@v2
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.issues.createComment({
issue_number: ${{ github.event.number }},
owner: context.repo.owner,
repo: context.repo.repo,
body: ${{ env.PULL_MSG }}
})