@@ -9,10 +9,11 @@ permissions:
99 pull-requests : write
1010
1111env :
12- COPIER_OPTIONS : " --trust -A -r main"
12+ COPIER_OPTIONS : " --trust -A -r main -c 3 "
1313
1414jobs :
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"
0 commit comments