Page 1 of 1

Pull requests for GitHub

PostPosted: Fri Jun 10, 2011 9:53 am
by Tvangeste
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

Re: Pull requests for GitHub

PostPosted: Thu Jun 16, 2011 10:50 am
by chulai
Is it possible to pin this topic? Like a post announcement.

Free mahjong connect

PostPosted: Thu Aug 24, 2017 8:22 am
by ankit
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

Re: Pull requests for GitHub

PostPosted: Sat Oct 07, 2017 7:07 am
by tommyhulk
A great blog, I will share it with my friends, thanks for your valuable posts
slither

Call Girls in Delhi

PostPosted: Thu Nov 16, 2017 12:29 pm
by sneha gupta
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

Re: Pull requests for GitHub

PostPosted: Sat Dec 23, 2017 6:46 am
by suhanakhan
Thank you for helping people get the information they need. Great stuff as usual. Keep up the great work!
Delhi Escorts

OBAT ABORSI MALANG

PostPosted: Thu Jan 11, 2018 7:55 pm
by ayu anita
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