mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-10-13 17:49:25 +00:00
Merge pull request #464 from MichaelDepner/add-PR-template-and-check
Add pr template and check
This commit is contained in:
2 files changed
+43
No files matched your search
@@ -0,0 +1,7 @@
|
|||||||
|
# READ ME BEFORE SUBMITTING A PR
|
||||||
|
|
||||||
|
Please do not submit a PR with your solution to the Gilded Rose Kata. This repo is intended to be used as a starting point for the kata.
|
||||||
|
|
||||||
|
- [ ] I acknowledge that this PR is not a solution to the Gilded Rose Kata, but an improvement to the template.
|
||||||
|
|
||||||
|
## Please provide your PR description below this line
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
name: "PR Tasks Completed Check"
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
types: opened
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
task-check:
|
||||||
|
# Only run from the base repository
|
||||||
|
if: github.event.repository.name == 'emilybache/GildedRose-Refactoring-Kata'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
issues: write
|
||||||
|
pull-requests: write
|
||||||
|
steps:
|
||||||
|
- name: Comment if checkmark is missing
|
||||||
|
if: ${{ !contains(github.event.pull_request.body, '[X] I acknowledge') }}
|
||||||
|
uses: actions/github-script@v6
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
github.rest.issues.createComment({
|
||||||
|
issue_number: context.issue.number,
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo,
|
||||||
|
body: "Please don't submit a Pull Request containing a Kata solution to the original repo from Emily Bache. If you are instead trying to add an improvement, please resubmit this PR and check the `[X]` box in the PR template."
|
||||||
|
})
|
||||||
|
- name: Close PR if checkmark is missing
|
||||||
|
if: ${{ !contains(github.event.pull_request.body, '[X] I acknowledge') }}
|
||||||
|
uses: actions/github-script@v6
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
github.rest.pulls.update({
|
||||||
|
pull_number: context.issue.number,
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo,
|
||||||
|
state: 'closed'
|
||||||
|
})
|
||||||
Reference in new issue
Block a user