Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Since v11, this action now creates a second commit #40

Closed
dhess opened this issue Jul 29, 2022 · 3 comments · Fixed by #41
Closed

Since v11, this action now creates a second commit #40

dhess opened this issue Jul 29, 2022 · 3 comments · Fixed by #41

Comments

@dhess
Copy link

dhess commented Jul 29, 2022

Thanks for this action.

Unfortunately, since v11, the action now creates 2 commits: the flake update, and a second commit that commits pr_body.template and pr_body.txt. For example, see this PR:

hackworthltd/hacknix#560

(Unfortunately, I didn't notice this until after Mergify committed the PR.)

(I created that PR by running the action using a manual workflow, so perhaps that's related.)

Here's the resuable workflow we're using, for reference:

https://github.com/hackworthltd/.github/blob/main/.github/workflows/reusable-update-nix-flake-public.yml

Prior to upgrading to v11, it worked great.

dhess added a commit to hackworthltd/.github that referenced this issue Jul 29, 2022
dhess added a commit to hackworthltd/hacknix that referenced this issue Jul 29, 2022
@cole-h
Copy link
Member

cole-h commented Jul 29, 2022

Thanks for the report, I'll take a look. Sorry for the unintentional mess!

@cole-h
Copy link
Member

cole-h commented Jul 29, 2022

I've just published a v12 that fixes this issue (reproduced in cole-h/update-flake-lock-test#26, fix demonstrated in cole-h/update-flake-lock-test#25).

Sorry again for the issue, and thanks for opening a ticket about it!

@cole-h
Copy link
Member

cole-h commented Jul 29, 2022

For a brief bit of background, the action we use to actually create the PR, https://github.com/peter-evans/create-pull-request, commits all new and modified files when it runs, and #38 introduced functionality to customize the PR body by using a template file.

The fix was to remove the undesired files before that action runs, as suggested in https://github.com/peter-evans/create-pull-request#remove-files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants