Skip to content

Commit 82db712

Browse files
authored
Merge pull request #21 from usnistgov/feature/copier-update
chore: update copier and requirements
2 parents 5af3523 + 942b5bf commit 82db712

File tree

4 files changed

+50
-18
lines changed

4 files changed

+50
-18
lines changed

.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.7.0-27-gdb54720
2+
_commit: v0.7.0-43-g7bef3d8
33
_src_path: https://github.com/usnistgov/cookiecutter-nist-python.git
44
command_line_interface: none
55
conda_channel: conda-forge

.github/workflows/copier-update.yml

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@ permissions:
99
pull-requests: write
1010

1111
env:
12-
COPIER_OPTIONS: "--trust -A -r main"
12+
COPIER_OPTIONS: "--trust -A -r main -c 3"
1313

1414
jobs:
1515
update:
16+
name: Update template
1617
runs-on: ubuntu-latest
1718
strategy:
1819
fail-fast: true
@@ -21,13 +22,13 @@ jobs:
2122
- add-paths: .
2223
body: Use this to merge the changes to this repository.
2324
branch: copier/update
24-
commit-message: "chore: accept new copier update"
25-
title: New updates detected with copier
25+
commit-message: "chore(template): accept new copier update"
26+
title: "chore(template): accept new copier update"
2627
- add-paths: .copier-answers.yml
2728
body: Use this to reject the changes in this repository.
2829
branch: copier/reject
29-
commit-message: "chore: reject new copier update"
30-
title: Reject new updates detected with copier
30+
commit-message: "chore(template): reject new copier update"
31+
title: "chore(template): reject new copier update"
3132
steps:
3233
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3334
with:
@@ -54,29 +55,46 @@ jobs:
5455
else
5556
echo "No .copier-answers.yml file"
5657
fi
57-
5858
echo "has_changes=$CHANGES" >> "$GITHUB_OUTPUT"
5959
6060
- name: Git config
6161
if: steps.check.outputs.has_changes == '1'
6262
run: |
6363
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
6464
git config --global user.name "github-actions[bot]"
65-
6665
git restore --staged .
6766
6867
- name: Create pull request
6968
if: steps.check.outputs.has_changes == '1'
69+
id: cpr
7070
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8.1.0
7171
with:
72+
# token: ${{ secrets.PAT }} # use when have permissions
7273
token: ${{ secrets.GITHUB_TOKEN }}
7374
add-paths: ${{ matrix.add-paths }}
7475
commit-message: ${{ matrix.commit-message }}
76+
title: ${{ matrix.title }}
7577
branch: ${{ matrix.branch }}
7678
delete-branch: true
77-
branch-suffix: timestamp
78-
title: ${{ matrix.title }}
79+
# branch-suffix: timestamp # If want commit per run (instead of per workflow)
7980
body: |
8081
This is an autogenerated PR. ${{ matrix.body }}
8182
8283
[copier](https://github.com/copier-org/copier) has detected updates from the Cookiecutter repository.
84+
85+
- name: Pull request info
86+
if: ${{ steps.cpr.outputs.pull-request-number }}
87+
env:
88+
NUMBER: ${{ steps.cpr.outputs.pull-request-number }}
89+
URL: ${{ steps.cpr.outputs.pull-request-url }}
90+
OPERATION: ${{ steps.cpr.outputs.pull-request-operation }}
91+
SHA: ${{ steps.cpr.outputs.pull-request-sha }}
92+
BRANCH: ${{ steps.cpr.outputs.pull-request-branch }}
93+
VERIFIED: ${{ steps.cpr.outputs.pull-request-commits-verified }}
94+
run: |
95+
echo "Pull Request Number - $NUMBER"
96+
echo "Pull Request URL - $URL"
97+
echo "Pull Request Operation - $OPERATION"
98+
echo "Pull Request SHA - $SHA"
99+
echo "Pull Request BRANCH - $BRANCH"
100+
echo "Pull Request VERIFIED - $VERIFIED"

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ repos:
152152
- "--custom-command=prek run pyproject2conda-project --all-files"
153153
# ** uv
154154
- repo: https://github.com/astral-sh/uv-pre-commit
155-
rev: 0.10.5
155+
rev: 0.10.6
156156
hooks:
157157
- id: uv-lock
158158
alias: requirements
@@ -165,7 +165,7 @@ repos:
165165

166166
# * Commit message
167167
- repo: https://github.com/commitizen-tools/commitizen
168-
rev: v4.13.8
168+
rev: v4.13.9
169169
hooks:
170170
- id: commitizen
171171
stages: [commit-msg]

uv.lock

Lines changed: 20 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)