Skip to content
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

Update auto-draft workflow to skip on nit: PRs #1710

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions .github/workflows/auto-draft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@ jobs:
continue-on-error: true # We should not block if this action fails for some reason
if: github.event.pull_request.draft == false
shell: bash
run: >
gh pr ready "$URL" --undo &&
printf 'Thanks for the PR! :heart:\nI am marking it as a draft,
once passing your happy and the PR is passing CI click the
\"Ready for review\" button below.' |
gh pr comment "$URL" -F -
run: |
if ! [[ "$TITLE" =~ ^nit:.* ]]; then
gh pr ready "$URL" --undo
printf "$MESSAGE" | gh pr comment "$URL" -F -
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
URL: ${{ github.event.pull_request.html_url }}
TITLE: ${{ github.event.pull_request.title }}
MESSAGE: "Thanks for the PR! :heart:\nI'm marking it as a draft, once your happy with it merging and the PR is passing CI, click the \"Ready for review\" button below."
5 changes: 4 additions & 1 deletion docs/source/development/01_guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ either rely on [molecule](./02_molecule.md) or, maybe,

When a PR is opened or reopened on the CI-Framework repo the Github bot will enable the draft status.
Once your patch is passing CI and you would be happy with it merging, click the "Ready for review" button,
this will trigger the review ready workflow
this will trigger the review ready workflow.

If you have a small patch you would like to skip the auto-draft workflow, you can prefix your git commit title
with `nit:`

### Review ready automation

Expand Down