lewiscawte / CIA.vc

Automatically exported from code.google.com/p/cia-vc
1 stars 0 forks source link

Add CIA Support for Assembla Through a WebHook #32

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
CIA could support Assembla through a WebHook very similar to the Google
Code webhook. Assembla already supports a webhook system that can use these
variables:
    *  %{author}: Name of the author who triggered the event
    * %{object}: Class name of the related object in the event.
    * %{space}: Space in which the event happened
    * %{action}: The action that triggered the event.
    * %{title}: title of a message, wiki page, or name of uploaded file, ...
    * %{link}: link to the event in Assembla

Note: Because Assembla isn't just a version control host (it hosts full
development workspaces including tickets, wikis, and all sorts of other
features), you can't really just get commit messages from it.

Right now, I have a somewhat hackish setup that sends this to the Google
Code webhook URL:
{
   "project_name": "Arch-Stable",
   "repository_path": "",
   "revision_count": 0,
   "revisions": [
     { "revision": 0,
       "url": "",
       "author": "",
       "timestamp":   0,
       "message": "%{author} has %{action} a %{object}: %{title} (%{link})",
       "path_count": 1,
       "added": [],
       "modified": ["%{space}"],
       "removed": []
     }
   ]
 }

This results in messages that look like this on IRC:
Arch-Stable:  * r0 /X-Versioning: debio264 has updated a Ticket: Re: Ticket
#11: Test Ticket (http://www.assembla.com/spaces/X-version/tickets/11)

Git commit messages, for some reason, are split into separate lines:
(02:36:39 PM) CIA-15: Arch-Stable:  * r0 /X-Versioning:
(02:36:39 PM) CIA-15: Arch-Stable: debio264 has committed a Changeset:
debio264 committed
(02:36:39 PM) CIA-15: Arch-Stable:
[bd077158b02568579f04d5d3dd95783ad44a5fea]: removed test file for the last time
(02:36:39 PM) CIA-15: Arch-Stable: Branch:master
(02:36:39 PM) CIA-15: Arch-Stable:
(http://code.assembla.com/X-version/git/changesets/bd077158b02568579f04d5d3dd957
83ad44a5fea)

I doubt that version control support can improve much because Assembla
supports multiple version control systems, and the variables are set up the
way they are to be generic across all version control systems. Hopefully,
however, this setup could be improved?

Original issue reported on code.google.com by debio...@gmail.com on 12 Jul 2009 at 7:39

GoogleCodeExporter commented 9 years ago
After some more research, support for Assembla would probably have to come from 
a
standard URL or POST based approach because Assembla's webhook system doesn't 
escape
quotes at all. This is making some messages not appear when using the setup 
above.

Original comment by debio...@gmail.com on 12 Jul 2009 at 10:52

GoogleCodeExporter commented 9 years ago
Looks like CIA.vc already supports it. See: 
https://cia.vc/blog/2009/03/google-revisited/

Original comment by gstein on 9 Oct 2011 at 5:49