Pull requests for GitHub

Report bugs here

Pull requests for GitHub

Postby Tvangeste » Fri Jun 10, 2011 9:53 am

Since some of the GoldenDict contributors don't speak Russian, I decided to post it here.

This post is about how to create pull requests with your fixes for GoldenDict easily.

1. Here's the generic description of the process from GitHub's own help pages: How to send pull requests.

Essentially, it boils down to:
* Fork the main GoldenDict repository on GitHub: https://github.com/goldendict/goldendict
* Create a feature branch in your forked repository, fix things, commit, push changes to your branch
* Go to your branch in your repository, and click "Pull request" button.

For every pull request, a new issue will be automatically generated, so the pull requests can be properly discussed and reviewed.

2. There is one interesting limitation of the current github way of dealing with pull requests. There is no way in the UI (on the web site) to attach the pull request to some previously existing bug/issue.

I checked with github support and they informed me that it *can* be done, but only via their API, not from the web site.

Not a big deal, I wrote a script to simplify this. You can take a look at it here: https://github.com/VVSiz/github-helpers

The script is called create_pull.rb, written in Ruby and requires that curl is installed and in the path (curl.exe for Windows).

The script can speed up and simplify pull request creation. Here's the list of arguments the script understands:

Code: Select all
Usage: ruby create_pull.rb [options]

Mandatory:
    -f, --from BRANCH_NAME           Source Branch
    -n, --name SUBJECT               Short name of the pull request
    -i, --issue ISSUE_NO             Existing Issue Number

Optional:
    -d, --description TEXT           Description of the pull request
    -r, --tr REPO_NAME               Target Repo [Default: goldendict/goldendict]
    -t, --to BRANCH_NAME             Target Branch [Default: master]
    -u, --user LOGIN                 Github login [Default: _YOUR_GITHUB_LOGIN_]
    -p, --pass PASS                  Github pass
    -v, --verbose                    Only show the command
    -h                               Help

Here's the simplest command line to create a pull request from script, without going to the web site:

Code: Select all
ruby create_pull.rb --from FEATURE_BRANCH --name PULL_REQUEST_SHORT_NAME --user YOUR_USER_NAME

That's it, very simple. *And*, we can attach the pull requests to the existing issue too!
Code: Select all
ruby create_pull.rb --issue 27 --from FEATURE_BRANCH --user YOUR_USER_NAME

This example will create a pull request, and attach it to issue 27.

Here's a typical example, with script output (before executing things, the script will ask for confirmation, for the extra safety):
Code: Select all
ruby create_pull.rb --user VVSiz --pass YYY --from feature6 --name feature_6

User: VVSiz
Pass: *********

Target Repo: goldendict/goldendict
Pull request: VVSiz:feature6 --> master
Pull request's title: feature_6

Create pull request? (y/N) y

HTTP/1.1 201 Created


P.S. You could adjust the script you our own needs, setting DEFAULT_USER, DEFAULT_PASS, DEFAULT_TARGET_REPO values to your particular situation, so that there will be no need to provide them via command line parameters.

P.P.S. Direct link to the latest version of the script: https://raw.github.com/VVSiz/github-hel ... te_pull.rb
Tvangeste
 
Posts: 893
Joined: Thu Jun 02, 2011 11:42 am

Re: Pull requests for GitHub

Postby chulai » Thu Jun 16, 2011 10:50 am

Is it possible to pin this topic? Like a post announcement.
chulai
 
Posts: 464
Joined: Sat Jan 08, 2011 10:11 pm

Free mahjong connect

Postby ankit » Thu Aug 24, 2017 8:22 am

Free mahjong connect is new and amazing online game website.I can say about this website this has completely free and easy access.If you want to play then go on Free mahjong connect online game website
THANKS GUYS
ankit
 
Posts: 5
Joined: Thu Aug 24, 2017 8:11 am

Re: Pull requests for GitHub

Postby tommyhulk » Sat Oct 07, 2017 7:07 am

A great blog, I will share it with my friends, thanks for your valuable posts
slither
tommyhulk
 
Posts: 32
Joined: Fri Sep 15, 2017 4:22 am

Call Girls in Delhi

Postby sneha gupta » Thu Nov 16, 2017 12:29 pm

I really enjoy simply reading all of your weblogs. Simply wanted to inform you that you have people like me who appreciate your work. Definitely a great post. Hats off to you! The information that you have provided is very helpful.if you want some fun so please visit our Site.

Call Girls in Delhi
sneha gupta
 
Posts: 80
Joined: Mon Nov 13, 2017 6:04 am

Re: Pull requests for GitHub

Postby suhanakhan » Sat Dec 23, 2017 6:46 am

Thank you for helping people get the information they need. Great stuff as usual. Keep up the great work!
Delhi Escorts
suhanakhan
 
Posts: 28
Joined: Mon May 15, 2017 8:26 am

OBAT ABORSI MALANG

Postby ayu anita » Thu Jan 11, 2018 7:55 pm

jual obat aborsi memberi informasi untuk cara menggugurkan kandungan dengan faktor korban pemerkosaan atau jika di teruskan masa kehamilan nya akan membahayakan nyawa san ibu . Dengan obat penggugur kandungan rasa malu anda akan tertutupi apabila anda belum mempunyai pasangan dalam rumah tangga. Biasanya kasus aborsi terjadi karena pemerkosaan. obat cytotec misoprostul 200mcg untuk menggugurkan kandungan secara alami sangat aman dan tidak mempengaruhi kehamilan selanjut nya.
demekian artikel yang saya ulas....semoga bermanfaat.
Informasi klinik kami men jual obat aborsi di kota besar indonesia anda bisa search di google seperti di bawah.
jual obat aborsi batam
jual obat aborsi semarang
jual obat aborsi surabaya
jual obat aborsi sidoarjo
jual obat aborsi malang
jual obat aborsi bandung
jual obat aborsi tangerang
ayu anita
 
Posts: 102
Joined: Thu Jan 11, 2018 7:21 pm

impossible game

Postby impossiblegameaz » Mon Mar 19, 2018 6:17 am

I have a similar interest this is my page read everything carefully and let me know what you think.
- impossible game
impossiblegameaz
 
Posts: 10
Joined: Wed Feb 28, 2018 4:09 am



Next

Return to Bugs

Who is online

Users browsing this forum: No registered users and 3 guests