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

Update commits do not provide a helpful diff #3

Open
benkehoe opened this issue Sep 28, 2021 · 8 comments
Open

Update commits do not provide a helpful diff #3

benkehoe opened this issue Sep 28, 2021 · 8 comments

Comments

@benkehoe
Copy link

I guess the pull requests for updating the repo commits are automatically generated, and they use a commit that does not have the current head as a parent, so the .gitmodules file appears new every time. This means you can't see which repos have been updated. It'd be nice to have a meaningful diff (and history) to be able to know what's changing.
Example: https://github.com/PatMyron/cloudformation-resource-providers/pull/1/files#diff-fe7afb5c9c916e521401d3fcfb4277d5071798c3baf83baf11d6071742823584

@PatMyron
Copy link
Owner

PatMyron commented Sep 28, 2021

Agreed that'd be better, here's where commit-message is set if anyone figures out how to improve:
https://github.com/PatMyron/cloudformation-resource-providers/blob/main/.github/workflows/cron.yaml#L18-L22

@benkehoe
Copy link
Author

Maybe adding base: main?

@PatMyron
Copy link
Owner

base branch for the automatic PR is already main:
#1

@benkehoe
Copy link
Author

Yeah, the action notes that actions which checkout a commit may require base: main as input to the create-pull-request action. It's weird because the commit created has no parent

@benkehoe
Copy link
Author

Wait. The default branch on the repo is create-pull-request/patch
image
and main is empty 🤔
image

@PatMyron
Copy link
Owner

PatMyron commented Sep 28, 2021

working on main and the PR keeps force pushing a commit to create-pull-request/patch using main as base
(switched default to create-pull-request/patch so everyone can easily see the code written by those auto PRs)

@benkehoe
Copy link
Author

this means that the diff of the PR is always against main which does not have .gitmodules. If the PR is never merged, .gitmodules is always new in the commit.

Wouldn't it make sense to have the action work on main, automatically push a commit (if anything has changed), and do work on workflows in a separate branch?

@PatMyron
Copy link
Owner

PatMyron commented Sep 28, 2021

tbh haven't dug into git submodules enough to understand what happens when the same submodule is added more than once


agree the generic commit force-pushing without merging is hacky/unideal
fork, test, and open a PR if desired :)
(don't have much time on this now that I left CloudFormation, just figured I'd share this monorepo that helped me while working there)

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

No branches or pull requests

2 participants