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

ci: let pre-commit-autoupdate create prs in draft mode #965

Merged
merged 1 commit into from
Apr 24, 2024
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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