Skip to content

Commit 8ca7335

Browse files
authored
chore(template): accept new copier update (#46)
Co-authored-by: wpk-nist-gov <5348008+wpk-nist-gov@users.noreply.github.com>
1 parent ee9c80b commit 8ca7335

4 files changed

Lines changed: 14 additions & 8 deletions

File tree

.copier-answers.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
2-
_commit: v0.9.0
2+
_commit: v0.9.0-23-g09afd92
33
_src_path: https://github.com/usnistgov/cookiecutter-nist-python.git
44
command_line_interface: typer
55
conda_channel: conda-forge

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ jobs:
125125
echo "prek_version=${prek_version}" >> "$GITHUB_ENV"
126126
127127
- name: Setup prek
128-
uses: j178/prek-action@0bb87d7f00b0c99306c8bcb8b8beba1eb581c037 # v1.1.0
128+
uses: j178/prek-action@79f765515bd648eb4d6bb1b17277b7cb22cb6468 # v2.0.0
129129
with:
130130
prek-version: ${{ env.prek_version }}
131131
install-only: true

.github/workflows/update-copier.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ on:
33
schedule:
44
- cron: "0 2 * * 1" # Every Monday at 2am
55
workflow_dispatch:
6+
inputs:
7+
automerge:
8+
description: "enable automerge"
9+
required: false
10+
type: boolean
11+
default: false
612

713
concurrency:
814
group: ${{ github.workflow }}-${{ github.ref }}
@@ -14,6 +20,7 @@ permissions:
1420

1521
env:
1622
COPIER_OPTIONS: "--trust -A -r main -c 3"
23+
AUTOMERGE: "false"
1724

1825
jobs:
1926
update:
@@ -76,7 +83,7 @@ jobs:
7683
conflict_message="Resolve conflicts."
7784
commit_message="$commit_message [skip ci]"
7885
# check for new untracked files
79-
elif [ -n "$(git status --untracked-files=normal --porcelain)" ]; then
86+
elif git status --porcelain | grep -q '^??'; then
8087
automergeable='false'
8188
fi
8289
fi
@@ -96,7 +103,7 @@ jobs:
96103
git config --global user.name "github-actions[bot]"
97104
git restore --staged .
98105
fi
99-
shell: bash -euxo pipefail {0}
106+
shell: bash -euxo {0}
100107

101108
- name: Create pull request
102109
if: steps.check.outputs.changed == 'true'
@@ -140,7 +147,8 @@ jobs:
140147
141148
- name: automerge
142149
if:
143-
${{ steps.cpr.outputs.pull-request-number &&
150+
${{ (inputs.automerge || env.AUTOMERGE == 'true') &&
151+
steps.cpr.outputs.pull-request-number &&
144152
steps.check.outputs.conflict_message == '' &&
145153
steps.check.outputs.automergeable == 'true' }}
146154
env:

.pre-commit-config.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ repos:
1717
- repo: meta
1818
hooks:
1919
- id: check-hooks-apply
20-
stages: [manual]
2120
- id: check-useless-excludes
22-
stages: [manual]
2321

2422
# * sync dependencies
2523
- repo: https://github.com/wpk-nist-gov/sync-pre-commit-hooks
@@ -151,7 +149,7 @@ repos:
151149
- "--custom-command=prek run pyproject2conda-project --all-files"
152150
# ** uv
153151
- repo: https://github.com/astral-sh/uv-pre-commit
154-
rev: 0.11.0
152+
rev: 0.11.1
155153
hooks:
156154
- id: uv-lock
157155
alias: requirements

0 commit comments

Comments
 (0)