Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically associate issue numbers between code and issue repositories #4

Closed
quicksketch opened this issue Sep 8, 2013 · 14 comments

Comments

@quicksketch
Copy link
Member

Right now our repositories are split into code and issues due to limitations of the Github permissions system (see #2). This means that when we reference an issue in a commit, i.e.:

Issue #10: Fixes some issue with some module.

This commit does not automatically post a comment in issue 10 like it would if the issue tracker and code repository were the same thing. We should be able to leverage the Github API to restore this automatic functionality between repositories.

Note that Github already allows cross-repository linking (per https://help.github.com/articles/issues-only-access-permissions), but the syntax is awkward. We'd prefer that linking was simply automatic based on the names of the repositories. i.e. a pull request on the "backdropcms.org" repository would automatically associate commits in the "backdropcms.org-issues" repository issue tracker.

@sirkitree
Copy link

This is kinda the same as issue #3 for me, I'd rather have a good issue tracker than to try and put band-aids on this one.

@sirkitree
Copy link

The api has methods for creating issues and editing issues. Conceivably using post receive hooks we could trigger a script to update another project. I'd be inclined to use node.js for this only because I've written other integrations using the node-github library.

@sirkitree
Copy link

Once we have something for #3 we'll be able to tack this on there as well.

@quicksketch
Copy link
Member Author

One this issue is complete, there are a ton of useful ways we could combine labels between issues and their pull requests, as detailed in #7.

@sirkitree
Copy link

Git Refs is the API call I think we would want to use.

We're still going to have to write a parser to find references within commit messages. I'm not sure if GitHub's is open source or not. Writing the parse will be the hard part in this.

Once we parse a message and find a ticket number (#) then we can make this API call to reference the equivalent issue number within the backdrop-issues project.

I'm going to look around a bit more to see if I can find GitHub's commit parser.

@sirkitree
Copy link

https://help.github.com/articles/closing-issues-via-commit-messages has the list of command to close issues, so we would want to support each of those. Personally I think the built in cross repo syntax is fine.

Closes backdrop/backgrop-issues#45

It's a good bit more typing than

Closes #45

But that's what text-expander is for, right? 😉

@Gormartsen
Copy link
Member

This part is done for PUSH.

Tomorrow will do for PR.

example:
screen shot 2016-03-12 at 11 16 00 pm

Comments will be posted on "backdrop-ci" behalf.

Gormartsen added a commit to itpatrol/test that referenced this issue Mar 13, 2016
@Gormartsen
Copy link
Member

@quicksketch @jenlampton This part is ready.
Every commit or PR with #NNN to backdrop/backdrop will get extra comment from githubauto app with proper link like backdrop/backdrop-issues#NNN

See example here and here:
itpatrol/test#6
itpatrol/test@3a563b8#comments

We need to properly configure http://github.backdrop.expert to use backdrop-ci instead of my "Gormartsen" access to do this comments and properly webhook backdrop/backdrop repo to this app.

@Gormartsen
Copy link
Member

Code is in this repo: https://github.com/backdrop-ops/github-auto

@Gormartsen
Copy link
Member

Mind map for PR #13 for this issue.
screen shot 2016-03-22 at 11 13 05 pm

quicksketch pushed a commit that referenced this issue Mar 24, 2016
…les for GitHub/preview server integration.
@Gormartsen
Copy link
Member

one more todo:

  • - fetch all comments for PR and look for #NNN to add message 'Related to backdrop/backdrop-issues#NNN'

@quicksketch
Copy link
Member Author

We've merged #201, so this is 90% done! We just have to handle the item Gor mentioned in the previous comment. Very nice!

@Gormartsen
Copy link
Member

I closed #201

@quicksketch
Copy link
Member Author

Let's close this issue as complete and file new issues for any followups.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants