todogroup / repolinter

Repolinter, The Open Source Repository Linter
https://todogroup.github.io/repolinter/
Apache License 2.0
421 stars 72 forks source link

github-pull-request-template-exists does not consider all regex #321

Closed jlosito closed 2 months ago

jlosito commented 5 months ago

Issue Report

I have a pull request template stored in my repository under .github/pull_request_template.md. When running repolinter against the project, it states that I do not have one even though I do.

✖ github-pull-request-template-exists: Did not find a file matching the specified patterns
        ✖ PULL_REQUEST_TEMPLATE*
        ✖ .github/PULL_REQUEST_TEMPLATE*

I am currently using v0.11.2.

Expected Behavior

I expect to be able to define my pull request templates using all of the allowable regex patterns that GitHub allows. An acceptable pattern is .github/pull_request_template.md according to their documentation linked below.

https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/creating-a-pull-request-template-for-your-repository

Actual Behavior

repolinter expected the request request template only to be under the root of that project with a file pattern as PULL_REQUEST_TEMPLATE* or under the .github, but these are not all of the acceptable patterns according to GitHub. In other words, repolinter only checks for a subset of the total amount of allowable patterns.

Steps to Reproduce the Issue

  1. Create a pull request template under the .github/pull_request_template.md path.
  2. Run repolinter against the project and observe that the tool still expects a pull request template.