-
-
Notifications
You must be signed in to change notification settings - Fork 358
Pr automation #1072
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Pr automation #1072
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
c35e9ca
added first pr action - checklists
gregsdennis daa417a
add enforcement
gregsdennis a16656d
check out files first
gregsdennis 59a6810
full file path
gregsdennis 41dfae6
get pr number
gregsdennis 32d389a
search for comment
gregsdennis 7ab42c8
add debug step
gregsdennis 6143c6d
alternate way of getting first comment
gregsdennis 0797e68
more debugging
gregsdennis 503e5d6
new action for updating the first 'comment' or 'body'
gregsdennis d634dbd
input token as param
gregsdennis 598fa15
append existing text
gregsdennis e5ae410
no quotes
gregsdennis d051a97
no new line
gregsdennis 09478c2
quotes
gregsdennis c507d83
needs another blank line
gregsdennis 3e1aa12
disable update for existing prs
gregsdennis c56bb21
trying a different checklist verifier
gregsdennis ca72687
allow manual trigger
gregsdennis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
.github/workflows/checklist.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
|
|
||
|
|
||
| --- | ||
|
|
||
| - [ ] [Issue](https://github.com/json-schema-org/json-schema-spec/issues) linked | ||
| - [ ] [Milestone](https://github.com/json-schema-org/json-schema-spec/milestones) assigned | ||
| - [ ] Test coverage issue in [test suite](https://github.com/json-schema-org/JSON-Schema-Test-Suite) |
34 changes: 34 additions & 0 deletions
.github/workflows/checklist.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| name: Checklist Handler | ||
| on: | ||
| pull_request: | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| add-checklist: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| - name: Get Comment Body | ||
| id: get-comment-body | ||
| run: | | ||
| existing="${{ github.event.pull_request.body }}" | ||
| body="${existing}$(cat .github/workflows/checklist.md)" | ||
| body="${body//'%'/'%25'}" | ||
| body="${body//$'\n'/'%0A'}" | ||
| body="${body//$'\r'/'%0D'}" | ||
| echo ::set-output name=body::$body | ||
| - name: Update comment | ||
| if: github.event.action == 'opened' | ||
| uses: AsasInnab/pr-body-action@v1 | ||
| with: | ||
| body: ${{ steps.get-comment-body.outputs.body }} | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| enforce-checklist: | ||
| runs-on: ubuntu-latest | ||
| needs: add-checklist | ||
| steps: | ||
| - uses: mheap/require-checklist-action@v1 | ||
| with: | ||
| requireChecklist: false # If this is true and there are no checklists detected, the action will fail | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.