devlato/react-shortcut

View on GitHub
.github/workflows/pr.yml

Summary

Maintainability
Test Coverage
name: PR

on:
  push:
    branches-ignore:
      - master
      - gh-pages
    tags-ignore:
      - '*'
  pull_request:
    branches:
      - master
    types:
      - opened
      - reopened
      - synchronize

jobs:
  create_pull_request:
    name: Create or update a PR
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v1
      - name: Create a PR
        id: cpr
        uses: repo-sync/pull-request@v2.0.1
        with:
          github_token: '${{ secrets.GITHUB_TOKEN }}'
          pr_reviewer: devlato
          pr_assignee: devlato
          pr_label: '2.0.0'
          pr_milestone: '2.0.0'
      - name: Generate changelog
        run: |
          echo "::set-env name=pr_body::$(git log --oneline master..${{ github.ref }})"
          echo "PR:\n${pr_body}"
      - name: Update pull request
        uses: kt3k/update-pr-description@v1.0.0
        with:
          github_token: '${{ secrets.GITHUB_TOKEN }}'