# HG changeset patch # User Peter Sanchez # Date 1353034477 28800 # Thu Nov 15 18:54:37 2012 -0800 # Node ID 6e26cf2cd23b0557434122c3a3e8cdb96f4e3376 # Parent cf0d80caf293c5c5bef723e7f3d307a0c26309e9 Updated Readme, author info diff --git a/README b/README --- a/README +++ b/README @@ -2,7 +2,9 @@ This plugin allows you to update your local Mercurial repositories in Redmine when changes have been pushed to Bitbucket. -This plugin is a fork from Redmine Github Hook from Jakob Skjerning ( http://github.com/koppen/redmine_github_hook ) +This plugin was originally a fork from Redmine Github Hook from Jakob Skjerning ( http://github.com/koppen/redmine_github_hook ). Alessio Caiazza converted it to work with BitBucket. Unfortunately Alessio got very busy and the plugin fell behind. That's when I took over and made sure it stayed current with Redmine and BitBucket development. For instance, Redmine version 2 changed how plugins work or BitBucket added support for Git repo's. + +While I've submitted pull requests for Alessio Caiazza to merge into his repo, they've pretty much gone ignored. So my repo (https://bitbucket.org/petersanchez/redmine-bitbucket) should be the most recent / working version. == Description @@ -37,15 +39,31 @@ That's it. Bitbucket will now send a HTTP POST to the Redmine Bitbucket Hook plugin whenever changes are pushed to Bitbucket. The plugin then takes care of pulling the changes to the local repository and updating the Redmine database with them. +== Test + +You can test your plugin using curl. Put the following in a file called "test.txt" + +payload={"repository": {"name": "YOUR_REPO_NAME"}} + +Remember, the name has to match the Redmine project identifier. So if the repo and redmine project were named "some_project", then replace "YOUR_REPO_NAME" with "some_project" + +Then simply use the following command: + +curl -X POST -d @test.txt http://www.your-redmine-domain.com/bitbucket_hook + +You should simply receive "OK" as a response. Anything else and there was trouble. You can check your logs to troubleshoot. + + == Assumptions * Your project identifier in Redmine is the same as the project name on Bitbucket. -* Redmine 0.8 running on a *nix-like system. +* Redmine >= 0.8 <= 2.1.2 running on a *nix-like system. * Mercurial available on the commandline and the repository has the bitbucket url as a default path. == License +Copyright (c) 2012 Peter Sanchez Copyright (c) 2010 Alessio Caiazza Copyright (c) 2009 Jakob Skjerning diff --git a/init.rb b/init.rb --- a/init.rb +++ b/init.rb @@ -2,7 +2,7 @@ Redmine::Plugin.register :redmine_bitbucket_hook do name 'Redmine Bitbucket Hook plugin' - author 'Alessio Caiazza' + author 'Alessio Caiazza, Peter Sanchez' description 'This plugin allows your Redmine installation to receive Bitbucket post-receive notifications. Based on github work by Jakob Skjerning.' version '0.1.3' end