Skip to content

Commit

Permalink
ci: let pre-commit-autoupdate create prs in draft mode
Browse files Browse the repository at this point in the history
  • Loading branch information
afuetterer committed Apr 16, 2024
1 parent 94e655e commit 14d2c93
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ on:
- conftest.py
- package.json
- pyproject.toml
types:
- opened
- synchronize
- reopened
- ready_for_review # this is needed to trigger checks, when an auto-generated "draft" PR is set for "ready for review".

# Ref: https://docs.github.com/en/actions/using-jobs/using-concurrency
concurrency:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/pre-commit-autoupdate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ jobs:
sed -i -e 's/\]/>/g' updates.log
echo -e "## Proposed changes\n\nBumps the pre-commit config with the following updates:\n" > pr-body.md
cat updates.log >> pr-body.md
echo -e "\n---\nThis PR is auto-generated once a month." >> pr-body.md
echo -e "\nThis PR is auto-generated once a month.\n\n---" >> pr-body.md
echo -e "\n> [!NOTE]\n> Mark this PR as "ready for review" to trigger additional checks." >> pr-body.md
# Ref: https://github.com/peter-evans/create-pull-request
- name: Create pull request
uses: peter-evans/create-pull-request@70a41aba780001da0a30141984ae2a0c95d8704e # v6.0.2
Expand All @@ -55,6 +56,7 @@ jobs:
pre-commit
type:maintenance
delete-branch: true
draft: true
- name: Write to job summary
run: |
cat updates.log >> $GITHUB_STEP_SUMMARY

0 comments on commit 14d2c93

Please sign in to comment.