Skip to content

Commit

Permalink
CNDB-12526 move PR checklist into PR comment (#1541)
Browse files Browse the repository at this point in the history
Having checklist in the PR template creates an issue with copying PR
description into squashed commit:
- either commit messages are polluted with PR templates by default
- or commit message contains only title by default.

This PR moves checklist into separate comment, so both title and
description of a PR can be copied into squashed commit message by
default.
  • Loading branch information
k-rus authored Jan 31, 2025
1 parent cece65b commit a074898
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/checklist_comment_on_new_pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Comment on new Pull Request with checklist
on:
pull_request:
types: opened

jobs:
checklist-comment:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Add comment
run:
gh pr comment $PRNUM --body-file .github/workflows/pr_checklist.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
PRNUM: ${{ github.event.pull_request.number }}
10 changes: 10 additions & 0 deletions .github/workflows/pr_checklist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
### Checklist before you submit for review
- [ ] Make sure there is a PR in the CNDB project updating the Converged Cassandra version
- [ ] Use `NoSpamLogger` for log lines that may appear frequently in the logs
- [ ] Verify test results on Butler
- [ ] Test coverage for new/modified code is > 80%
- [ ] Proper code formatting
- [ ] Proper title for each commit staring with the project-issue number, like CNDB-1234
- [ ] Each commit has a meaningful description
- [ ] Each commit is not very long and contains related changes
- [ ] Renames, moves and reformatting are in distinct commits

0 comments on commit a074898

Please sign in to comment.