Matticusau / pr-helper

Extremely powerful GitHub Action to streamline management of PRs through automation of common tasks. Very versatile with plenty of configuration settings to adapt to many different implementations.
MIT License
9 stars 1 forks source link

Error when FrontMatter reviewer is enabled but file has no frontmatter #30

Closed Matticusau closed 4 years ago

Matticusau commented 4 years ago

Bug Report

Current Behavior After enabling the frontmatter reviewer assignment and modifying a file that has no frontmatter it generates the following error

image

To Reproduce Steps to reproduce the behavior:

  1. Create a PR that modifies files with no frontmatter
  2. See error

Expected behavior/code Should not generate an error for files without frontmatter and should not assign a reviewer

GitHub Action Configuration (.yml, etc)

with:
        repo-token: ${{ secrets.GITHUB_TOKEN }}
        enable-prmerge-automation: true
        enable-prcomment-automation: true
        enable-prlabel-automation: true
        enable-prreviewer-frontmatter: true
        enable-welcomemessage: true
        welcome-message: "Thanks for opening an issue! Make sure you've followed CONTRIBUTING.md."
        prmerge-requireallchecks: true
        prmerge-requirereviewcount: -1
        prmerge-pathcheck: true
        prmerge-method: 'merge'
        prmerge-deletebranch: true
        prmerge-deletebranch-config: '{"deny":["dev", "main"]}'
        prmerge-allowpaths: '{"any":["docs/**","assets/**"]}'
        prreviewer-authorkey: 'author'
        prreviewer-githubuserfromauthorfile: true
        prreviewer-authorfilepath: '_data/authors.yaml'
        prlabel-default: 'pr-onhold'
        prlabel-ready: 'pr-ready'
        prlabel-onhold: 'pr-onhold'
        prlabel-reviewrequired: 'review-required'
        prlabel-automerge: 'auto-merge'

Possible Solution TBA

Additional context/Screenshots

image