I want to build an automation to create many pull requests on GIT by just click of a button. Input for the API would be source and destination branch. I have come across ways to checkout repository using jgit but did not get anything to create pull request automatically. Please assist.
Related
I'm trying to install 'GitHub Pull Requests and Issues' on VSCODE which worked but I can't do anything, like login to my GitHub account.
I already have Git installed on my Computer.
you need to be on the GitHub Pull Request page. Click on the create new pull request button. Then choose a target branch to which you want to pull, and from which you want to pull.
When you click “Create”, if the branch is not yet pushed to the GitHub remote repository, the extension will ask whether you want to publish the branch and provide a dropdown menu for you to choose from.
The Create Pull Request, automatically allows you to review details in the pull request, in the Review Mode. You can add comments, reviewers, labels, and finally merge the pull request when it is ready to go.
As my browser was crashing I was not able to create a pull request from GitHub UI, I was trying to create a pull request from git console but didn't found any way to create a pull request.
I have also searched for the same over the net but most of the tutorials suggested to create a pull request from UIs only. I just want to be able to handle the pull request like creation, rejection, approved and merging without the browser. Please suggest.
git and github are separate products. github is a service that happens to use git, but it is not part of git, its UI is not a git interface, and git does not have any special support for github functionality.
There is a little potential confusion here, because there are "pull requests" - an integrated feature of github having to do with branch workflow - and there is git request-pull, a seemingly lesser-known feature of git which creates a text message you could send to another repository maintainer to request that they pull changes from your repository.
Naming confusion aside, the "pull request" you want is a feature of github, not git; and so git itself (including git console and any git UI tool) have no command for this. You have to use a github-supplied interface, and AFAIK that means the web UI.
To open a pull request from the command line, you can install the hub set of command-line tools that GitHub supports. This will allow you to create a pull request from a repository with:
hub pull-request
I'm not aware of any similar tools for managing pull requests, though.
git add -p
then
git commit -m "message"
then
git push origin "your_branch"
the pull request will be created in github
I can't seem to find in the egit documentation how to create a pull request from within Eclipse once you push a branch to a remote repository.
All the searches I've tried pull up command line answers or answers on how to do it from the web interface.
So right now I'm having to:
Make changes and commit locally to my branch
Do a "Team -> Push Branch..."
Once that's complete then open the remote repository from web browser and create a pull request from my branch there.
I want to be able to do that last step from within Eclipse.
This is not possible. Neither with egit nor with the github mylyn connector (which only allows you to track existing pull requests). You have to use the browser or other tools.
However, if your git server returns a result message containing a URL to your newly pushed branch, then the push result dialog shows that URL as a clickable link that you can use to open your browser more quickly on the right page to create a pull request.
On the event selection screen on Github I don't see an option for "When somebody pulls code from your repository"
Such a webhook would make my work very easy I can automate creation of support tickets based on them for the clients who pull the code.
Is there any hook similar to that or can I add a web-hook of my own for this? Any help or direction is greatly appreciated.
This isn't available directly on the GitHub side, no more than there is a pull or clone hook onthe server side (see "git hooks : is there a clone hook?").
You can clone a GitHub repo without authentication, and that doesn't leave any trace on GitHub side (except maybe in Github own internal logging system, which is not related to Git)
Say I have a repo and someone forks it. Then they do work and submit a pull request. But the code contains a large number of lines and/or it creates a GUI. I'd like to fetch it so I can actually see it run from Eclipse before merging it into my master. The options I've come up with are:
Create a second repo in EGit and clone directly from their fork.
Create a new branch just for them. Then leave a comment for the request asking them to re-submit the pull request using the new branch and that I'll be closing the current request (without merging)
Always keep around a branch for them to use in their pull requests.
Besides setting up an organization on Github what else could I do?
Then leave a comment for the request asking them to re-submit the pull request using the new branch and that I'll be closing the current request
They don't have to re-submit, it you test and merge first locally, as described in the "Merging a pull request" GitHub page.
git checkout master
git pull https://github.com/otheruser/repo.git branchname
If the local merge works, then you can go ahead and merge the pull request through the GitHub web interface.
GitHub has documented how to checkout a pull request.
As I have illustrated before in "What support for git namespaces exists in git hosting services", you can use refs/pull/<PRNumber>/head as remote pull reference, in command line or in Egit when, for instance, creating a new branch.
If the PR number is 123, you can simply use the EGit Pull action, and use pulls/123/head as reference.