-
Notifications
You must be signed in to change notification settings - Fork 143
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
Pushing git repositories #562
Comments
This seems to be a cool feature! What about the commit message? Something like this? $ git add {REPO_ROOT_PATH}
$ git commit -m "automatic push from Topgrae"
$ git push |
hmmm we could do that, but that does increase the chances of doing something wrong. Because also, what files do we add? Everything? only tracked files? Initially I wasn't thinking about making commits, just making sure that already made commits are pushed to the remote. I think that if we're going to be making commits on people's behalf, it should be quite configurable |
Yeah, this makes sense Would you like to submit a patch for this feature? The functionalities Topgrade provides about git are entirely about |
I'm okay with making a PR for this, the code for git doesn't seem too complicated, however, I will need some help understanding and using the test setup. Got any pointers on that one? |
Sadly, Topgrade does not have tests for such functionalities, I don't konw if there is a good way to test Topgrade steps, maybe use some BDD tool for this? |
ahhh okay, then it's fine. I'm happy to test it locally, I just figured there was some standard test framework that I'd need to integrate with, but if that's not a requirement I'll do what I can along the way. Not sure when I'll exactly have time to work on this, but I'm happy to take a crack at it :) |
So I've been taking a look at the very first steps, and I have a question. Should we actually make a separate step for this, or should we just integrate it into the existing git step with some extra configs? I started out thinking the first, but now that I'm a bit more in the weeds, I'm not so sure. There are a lot of things that are duplicated like the repos to discover that would be very annoying to maintain duplicates of essentially, and I imagine it would be quite rare to have the two steps not overlap nearly 100%? What do you think @SteveLauC ? |
Your thought is right, adding it to the existing |
I want to suggest a new step
Topgrade already supports pulling git repositories, but I'd like the optionto also push found repositories.
Which tool is this about? Where is its repository?
Source code version management. located here https://github.com/git/git
Which operating systems are supported by this tool?
The same as the existing git step
What should Topgrade do to figure out if the tool needs to be invoked?
Probably if there are branches in the repository with unpushed commits.
Which exact commands should Topgrade run?
git push for the appropriate branches.
More information
I can imagine this might have to be an opt in feature, but I'd really appreciate it. Just pushing to the default remote, and target branches with the same name and just erroring out if either of them is not set is enough for me and probably the safest option.
Thanks for all the hard work <3
The text was updated successfully, but these errors were encountered: