Private repository with public issues on GitHub

On contrary to BitBucket, GitHub does not allow you to have private repository with public issues. But, you can setup a two different repositories — private for code hosting and public for issues (read more in GitHub Help). And, what is most important and what not everyone knows — GitHub’s commit message’s grammar parsing is powerful enough to handle crossed commits.

By crossed commit I mean, that you can commit code changes to your private repository like that:

git commit -m "Change CRON job to run daily. Fixes company/public-repo#12"

and have both your private repository updated and and issue in public repository closed — all in one task.

Beautiful, isn’t that?

Having two separate repositories is also very handy for the development team, since you can have another layer of issues (the one, which you would not like to show off public, like for example any security-level issues) stored and handled in your private repository. That is exactly like Bitbucket works for the issues concerning Bitbucket itself. Everyone can post an issue to public (issue-only) repository, where it is (soon or later) verified by one of the team members. Then you can see “Issue placed in our internal issue tracker” comments flying all around.

Note, that aside of auto-closing an issue (in current or any other repository), you can also use other forms in commit message and they will be linked correctly, when browsing a commit with such message on GitHub.

Leave a Reply