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

New Feature: Issue Sync #75

Open
tierra opened this issue Apr 1, 2015 · 5 comments · May be fixed by #138
Open

New Feature: Issue Sync #75

tierra opened this issue Apr 1, 2015 · 5 comments · May be fixed by #138

Comments

@tierra
Copy link

tierra commented Apr 1, 2015

I've only just barely started work on this, but thought I'd drop a note in case anyone was interested in helping out with it or has some early feedback, ideas, suggestions, or recommendations...

I'm already using this plugin to keep git mirrors on Trac in sync with our authoritative repos on GitHub, but have found the lack of any Trac plugins with the ability to sync GitHub pull requests over to Trac, or sync activity on Trac back over to the appropriate GitHub pull requests to be painful. I'm sure others like us find GitHub issues severely lacking where Trac excels, or have just been using Trac issues for so long that it wouldn't be cost effective to switch have also wished for this kind of functionality. Everyone wants an official repository on GitHub for visibility and collaboration, but finds it annoying that pull requests can't be disabled when you still want patches submitted to Trac.

I've decided to extend this plugin with the ability to sync issue activity between Trac and GitHub. At least initially, I'm aiming mostly just for creating new Trac tickets for every new pull request, and automatically attaching patches generated from those pull requests to them, along with any updates to those pull requests. That's my primary priority.

After that, I'm planning to look into syncing ticket updates to those issues back to their original GitHub pull requests (which will likely require a GitHub account to post on behalf of, involving API keys), so developers only need to update the ticket on Trac, and the original contributor will still be notified on GitHub, and can still leave comments and updates there.

Others might be interested in turning on GitHub issues, and also syncing new Trac tickets over to GitHub if the plan is to eventually just switch to GitHub issues, but I'm not planning on doing that at all myself for now. Also, that workflow can mostly be avoided by just removing the TICKET_CREATE permission from Trac users, and directing them to GitHub.

I'll be working on this within my issue-sync branch here:
master...tierra:issue-sync

@aaugustin
Copy link
Contributor

Thanks for letting me know!

Some preliminary advice:

  • Keep features optional so users can mix and match according to their use case.
  • Check out the "test framework". It's ad-hoc, but it works. Currently the plugin has almost 100% test coverage. Try to write tests for the new features.
  • Don't forget to update the documentation in the README.

Since this is a significant extension in the scope of trac-github, and not one I'm likely to use, perhaps I'll end up merging it and giving you commit access to this repo :-)

If that doesn't work for whatever reason, and you don't want to fork, you could write a plugin that depends on this one and extends its classes. I'm willing to shuffle code around to make this easier.

@tierra
Copy link
Author

tierra commented Apr 1, 2015

I was planning on opening a pull request down the road when it's looking closer to finished (and yes, with adequate unit tests as well). I figured it would be best to combine more GitHub-related sync features into an existing plugin that already provides some GitHub-related sync features, otherwise I would have just started writing it as a new, independent plugin.

I guess that might end up back up for discussion though if I end up pulling in any 3rd party GitHub API python library down the road for that secondary feature allowing ticket updates to sync back to GitHub pull requests. Maybe it will end up being best to leave it in it's own plugin at that point.

@aaugustin
Copy link
Contributor

It's hard to tell where this will end when you're just starting to write the code :-)

Feel free to ping me in this issue if you have questions!

@aaugustin
Copy link
Contributor

If anyone wants to take @tierra's patch, update it to apply on the latest version of master, and add tests, that's certainly heplful.

@cooljeanius cooljeanius linked a pull request Nov 3, 2023 that will close this issue
@cooljeanius
Copy link

If anyone wants to take @tierra's patch, update it to apply on the latest version of master, and add tests, that's certainly heplful.

OK, I started PR #138 for that.

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

Successfully merging a pull request may close this issue.

4 participants