EndBug/add-and-commit requires that the checkout action is called with ref, when used on a pull request, so it knows which branch to commit to. For some reason this was not required on older versions (7) of EndBug/add-and-commit.
In https://github.com/dfinity/snsdemo/pull/368 I changed to an earlier version of EndBug/add-and-commit to avoid having to pass ref to the checkout action, depending on whether the run is for a PR, to avoid having to have 4 different checkout steps.
I realized now that I only need to pass the token if I plan to make changes, so I can combine the checkout steps and still only have 2 while also using newer versions of actions/checkout and EndBug/add-and-commit.
Changes
Check whether commits can be added based on both the presence of the PAT token and the even being for a PR.
Use actions/checkout@v4 and EndBug/add-and-commit@v9.1.4.
Motivation
EndBug/add-and-commit
requires that thecheckout
action is called withref
, when used on a pull request, so it knows which branch to commit to. For some reason this was not required on older versions (7) of EndBug/add-and-commit.In https://github.com/dfinity/snsdemo/pull/368 I changed to an earlier version of
EndBug/add-and-commit
to avoid having to passref
to thecheckout
action, depending on whether the run is for a PR, to avoid having to have 4 different checkout steps. I realized now that I only need to pass the token if I plan to make changes, so I can combine the checkout steps and still only have 2 while also using newer versions ofactions/checkout
andEndBug/add-and-commit
.Changes
actions/checkout@v4
andEndBug/add-and-commit@v9.1.4
.Tested
PR from a forked repo:
From this PR: