ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jaikiran Pai <>
Subject Process for handling GitHub PRs and closing them
Date Mon, 19 Jun 2017 03:14:24 GMT
We have (read only) github repos which back our main ASF git repos (consider the github ant-ivy
repo which is a read-only mirror of ASF git repo). Users submit pull requests to our github
repos and the process I follow for merging such PRs is the “rebase” approach which looks
something like this:

- Fetch the PR locally (git fetch github pull/45/head:pr-45)
- Checkout to that branch locally (git checkout pr-45)
- Rebase that PR on top of latest ASF (upstream) repo (git rebase asf/master)
- Run a short build, verify and push to ASF repo (git push asf pr-45:master)

(assume 45 is the pull request id).

So essentially, I rebase the commits from the PR on top of the latest master and then push
to the ASF repos. All this works fine and the ASF repos get those changes. However, this doesn’t
“close” the pull request on github.

Apparently, the way to have the pull request closed is doing a actual “merge” of the pull
request commits into the ASF repo instead of rebasing the commits. 

Then the other approach, which isn’t that clean IMO, is to push a commit to the ASF repo
with a commit message which includes “This closes #X” where X is the pull request id.
The ASF github bot then notices this commit messages and goes and closes the open PR. 

I usually prefer the rebase approach (the one I outlined above) for dealing with pull requests,
since it gives a clean git commit tree. But clearly that doesn’t have a way to close the

Is there any preferred approach that we should follow with PRs?

The other thing I had in mind, if we agree upon, is to have an enhancement raised with the
ASF infra team to allow adding some specific comment on the open PR by a *committer* which
then auto-closes the PR. Some comment like “This PR is merged”.

Any thoughts?

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message