Reviewed & tested by the community
Project:
Bot
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
11 Nov 2010 at 22:00 UTC
Updated:
28 Aug 2012 at 23:35 UTC
Jump to comment: Most recent file
Comments
Comment #1
mfbAdd some more metadata: project, status and number of comments
Comment #2
stborchertWouldn't it be better to remove the hardcoded support for Trac (and Redmine) from bot_project and let other modules extend bot_project through hooks?
We'd love to see an integration with Redmine but we need communication over Redmines REST-API :)
Comment #3
mfbI could reroll this patch as a new module if that's the direction that bot_project takes. This patch does use the REST API: GET /issues/[id].xml
Comment #4
stborchertSorry, you are right.
I will try to create a patch within the next days that implements some hooks to extend bot_project (maybe
hook_bot_project_info).For redmine support it would be great if we have the option to enter the redmine API-key so the module can access private repositories.
Something like this:
And maybe we could save some traffic by using json instead of xml?
Many ideas :)
Comment #5
stborchertOk, here's a patch that creates a single hook (
hook_bot_project_info) and allows other modules to "inject" settings for different issue trackers.Example module for redmine is attached (does nothing at the moment).
Comment #6
stborchertUhm, forgot to change version. My patch is against latest 7.x.
Comment #7
stborchertBtw., here's a working draft of my Redmine integration (based on the latest patch): http://drupal.org/sandbox/stborchert/1151786
Comment #8
Bevan commentedAwesome!
Comment #9
Bevan commentedI tested the patch with both project.module and
bot_project_redmine. I found two bugs inbot_project_redmine. See #1153522: isset() not issues() & depend on bot_project not bot and #1153524: Settings are not relevant.Those bugs do not affect this patch. The code style and architecture of this patch look fantastic. I could not test it with Trac, but otherwise I think I tested everything else. This is ready for maintainer review.
Comment #10
Bevan commentedI found a bug, possibly related to this patch; The bot can no longer join multiple channels. It only joins the first channel on the list in it's configuration. I did not debug it to find the cause.
Comment #11
stborchertHm, can't confirm this. We run bot.module with this patch (and bot_project_redmine) on one channel. I've added a new channel to the list, hit "Save configuration" and about 5 minutes later the bot joined the second channel.
Comment #12
Grayside commentedThere's some end of line whitespace in bot_project_api_scraper(), otherwise looks good.
Comment #13
Grayside commentedI've spent a good chunk of time in the last few days developing against this patch, both with the Bot project Redmine implementation and my new Bot GitHub project. I have to say this info hook/plugin system isn't bad, but doesn't go far enough as a helper system to justify ignoring existing IRC hooks and form_alter.
I still suggest this be committed, but with an understanding of follow-on enhancements. A few that have come to mind (and are varying degrees of implied by the two sandboxes linked above) include:
I'll delve further into any of those depending on how this patch and maintainer interest goes...
One thing this patch could use is a refactoring of the hook_help implementation to be less project.module focused. There should be a "Project" help that explains the core functionality of what Bot Project enables, and perhaps a set of callbacks for each of the enabled providers. If I understand how it works, maybe "Bot: help Project:Redmine" should provide the more specific help alone?
I think this is also an enhancement that can probably wait for a separate issue, so I leave this as RTBC.
Corrected the whitespace I noted above and attached the reroll.
Comment #14
morbus iffAs an FYI, my current inclination toward this issue is:
* Return bot_project.module to JUST being a project.module handler.
* Remove Trac support entirely and move it to a separate module.
* Remove API.module support entirely and move it to bot_api.module.
* Let other contrib modules provide Redmine/Trac/Github/etc./etc. integration.
I don't necessarily think that providing API hooks for every known PM tool in existence is a good idea.
Comment #15
Grayside commentedRight. My preference would probably be to simplifying bot project, or turning bot_project into a high level multi-PM handling system that other modules can opt to use, and gain a few common things, such as the stuff I mentioned in #13. Then bot_trac can be separated out, as bot_redmine already is.
Comment #16
dave reidI prefer keeping it simple with a solution like http://drupal.org/project/bot_url that can let other modules hook into how a response about an URL should be output.
Comment #17
Grayside commentedSolid direction, but it sidesteps the quick ref-by-number, which is where a good half the complexity is, for good or bad. (E.g., I'm always dropping #3151 and the like into IRC because I can avoid needing to copy-n-paste.)
Comment #18
dave reidYeah, I don't see people actually using ref-by-number as much as just links, which is why I started bot_url.
Comment #19
larowlanThis patch adds api key authentication for redmine, changes format to RM#### for straight numbers for point of difference to straight drupal nodes.
Comment #19.0
larowlanCorrecting issue description.