cloudformation-resource-providers icon indicating copy to clipboard operation
cloudformation-resource-providers copied to clipboard

Update commits do not provide diffs

Open benkehoe opened this issue 4 years ago • 8 comments

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

benkehoe avatar Sep 28 '21 16:09 benkehoe

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

PatMyron avatar Sep 28 '21 17:09 PatMyron

Maybe adding base: main?

benkehoe avatar Sep 28 '21 17:09 benkehoe

base branch for the automatic PR is already main: https://github.com/PatMyron/cloudformation-resource-providers/pull/1

PatMyron avatar Sep 28 '21 17:09 PatMyron

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 avatar Sep 28 '21 17:09 benkehoe

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

benkehoe avatar Sep 28 '21 17:09 benkehoe

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

PatMyron avatar Sep 28 '21 18:09 PatMyron

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?

benkehoe avatar Sep 28 '21 18:09 benkehoe

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


definitely agree the generic commit force-pushing without merging is hacky and less than ideal though feel free to fork, test, and open a PR if desired :) (don't have as much time on this now that I left CloudFormation, just figured I'd share the current state since this monorepo helped me a lot while working there)

PatMyron avatar Sep 28 '21 20:09 PatMyron