Skip to content
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
29 changes: 29 additions & 0 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
commitMessageLowerCase: 'never',
configMigration: true,
dependencyDashboard: true,
"pre-commit": {
enabled: true
},
customManagers: [
{
customType: 'regex',
Expand All @@ -25,6 +28,18 @@
packageNameTemplate: 'rust-lang/rust',
datasourceTemplate: 'github-releases',
},
{
customType: 'regex',
managerFilePatterns: [
'/^\\.github/workflows/pre-commit.yml$/',
],
matchStrings: [
'prek-version.*?(?<currentValue>\\d+\\.\\d+(\\.\\d+)?)',
],
depNameTemplate: 'prek',
packageNameTemplate: 'j178/prek',
datasourceTemplate: 'github-releases',
},
],
packageRules: [
{
Expand All @@ -41,6 +56,20 @@
],
automerge: true,
},
{
commitMessageTopic: 'Prek',
matchManagers: [
'custom.regex',
],
matchDepNames: [
'prek',
],
extractVersion: '^(?<version>\\d+\\.\\d+\\.\\d+)',
schedule: [
'* * * * *',
],
automerge: true,
},
// Goals:
// - Keep version reqs low, ignoring compatible normal/build dependencies
// - Take advantage of latest dev-dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ jobs:
components: rustfmt
- uses: Swatinem/rust-cache@v2
- name: Check formatting
run: cargo fmt --all -- --check
run: cargo fmt --check
clippy:
name: clippy
runs-on: ubuntu-latest
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
- uses: j178/prek-action@v1
with:
python-version: '3.x'
- uses: pre-commit/action@v3.0.1
prek-version: '0.2.27'
58 changes: 58 additions & 0 deletions .github/workflows/template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Template Update

permissions:
contents: read

on:
schedule:
- cron: '1 1 1 * *'
workflow_dispatch:

env:
RUST_BACKTRACE: 1
CARGO_TERM_COLOR: always
CLICOLOR: 1
TEMPLATE_URL: "https://github.com/epage/_rust.git"
TEMPLATE_BRANCH: "main"

concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true

jobs:
update:
permissions:
security-events: write # to create PR
pull-requests: write
contents: write # to push the branch
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Configure git
run: |
git config --global user.name '${{ github.actor }}'
git config --global user.email '<>'
- name: Fetch template
run: "git remote add template ${{ env.TEMPLATE_URL }} && git fetch template ${{ env.TEMPLATE_BRANCH }}"
- name: Merge template
run: "git checkout -b template-update && git merge template/${{ env.TEMPLATE_BRANCH }} -m 'chore: Update from template'"
- name: Clear any existing branch
run: "git push origin --delete template-update"
continue-on-error: true
env:
GH_TOKEN: ${{ github.token }}
- name: Push branch
run: "git push --set-upstream origin template-update"
env:
GH_TOKEN: ${{ github.token }}
- name: Create PR
run: "gh pr create --head template-update --title 'chore: Update from template' --body ''"
env:
GH_TOKEN: ${{ github.token }}
- name: Merge PR
run: "gh pr merge --auto --delete-branch"
env:
GH_TOKEN: ${{ github.token }}
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
default_install_hook_types: ["pre-commit", "commit-msg"]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
rev: v6.0.0
hooks:
- id: check-yaml
- id: check-json
Expand All @@ -10,10 +10,10 @@ repos:
- id: check-case-conflict
- id: detect-private-key
- repo: https://github.com/crate-ci/typos
rev: v1.32.0
rev: v1.42.1
hooks:
- id: typos
- repo: https://github.com/crate-ci/committed
rev: v1.1.7
rev: v1.1.10
hooks:
- id: committed
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ create_dir = "warn"
dbg_macro = "warn"
debug_assert_with_mut_call = "warn"
doc_markdown = "warn"
empty_enum = "warn"
empty_enums = "warn"
enum_glob_use = "warn"
expl_impl_clone_on_copy = "warn"
explicit_deref_methods = "warn"
Expand Down
Loading