Code Monkey home page Code Monkey logo

Comments (5)

cjfields avatar cjfields commented on September 28, 2024

Forgot to mention, version of git is 1.7.2.2. Note in the below log output the first command doesn't generate any output, but the second one does:

Processing GithubHookController#index (for 207.97.227.233 at 2011-04-04 15:47:27) [POST]
  Parameters: {"project_id"=>"bioperl", "payload"=>"{\"ref\":\"refs/heads/master\",\"created\":false,\"commits\":[{\"author\":{\"username\":\"cjfields\",\"email\":\"[email protected]\",\"name\":\"Chris Fields\"},\"timestamp\":\"2011-04-03T20:38:46-07:00\",\"modified\":[\"README\"],\"distinct\":true,\"url\":\"https://github.com/bioperl/bioperl-live/commit/983fb37a89be22476b0e4e3880dfb9891bf812b1\",\"message\":\"test hook\",\"added\":[],\"removed\":[],\"id\":\"983fb37a89be22476b0e4e3880dfb9891bf812b1\"},{\"author\":{\"username\":\"cjfields\",\"email\":\"[email protected]\",\"name\":\"Chris Fields\"},\"timestamp\":\"2011-04-03T20:47:22-07:00\",\"modified\":[\"README\"],\"distinct\":true,\"url\":\"https://github.com/bioperl/bioperl-live/commit/5e4f1516b6a4541d6dc3481427101cdffd94dfc7\",\"message\":\"test hook\",\"added\":[],\"removed\":[],\"id\":\"5e4f1516b6a4541d6dc3481427101cdffd94dfc7\"},{\"author\":{\"username\":\"cjfields\",\"email\":\"[email protected]\",\"name\":\"Chris Fields\"},\"timestamp\":\"2011-04-04T07:19:56-07:00\",\"modified\":[\"Bio/Tools/SeqStats.pm\",\"t/SeqTools/SeqStats.t\"],\"distinct\":true,\"url\":\"https://github.com/bioperl/bioperl-live/commit/536fd500d3cd308938513279d755d418ea86e0d5\",\"message\":\"use residue count for calcs instead of length, fixes bug #3185\",\"added\":[],\"removed\":[],\"id\":\"536fd500d3cd308938513279d755d418ea86e0d5\"}],\"repository\":{\"has_downloads\":true,\"url\":\"https://github.com/bioperl/bioperl-live\",\"watchers\":56,\"description\":\"Core BioPerl code\",\"fork\":false,\"forks\":21,\"has_wiki\":false,\"private\":false,\"size\":13584,\"pushed_at\":\"2011/04/04 07:19:59 -0700\",\"created_at\":\"2010/05/12 10:13:10 -0700\",\"language\":\"Perl\",\"has_issues\":false,\"owner\":{\"email\":\"[email protected]\",\"name\":\"bioperl\"},\"name\":\"bioperl-live\",\"organization\":\"bioperl\",\"open_issues\":1,\"homepage\":\"http://bioperl.org\"},\"base_ref\":null,\"before\":\"13813c2b5e8c5c825940a82f62e7c8715fc70f9b\",\"pusher\":{\"name\":\"none\"},\"after\":\"536fd500d3cd308938513279d755d418ea86e0d5\",\"deleted\":false,\"forced\":false,\"compare\":\"https://github.com/bioperl/bioperl-live/compare/13813c2...536fd50\"}", "action"=>"index", "controller"=>"github_hook"}
GithubHook: Command output: []
GithubHook: Command output: ["fatal: ambiguous argument 'refs/remotes/origin/master': unknown revision or path not in the working tree.\n", "Use '--' to separate paths from revisions\n"]
Completed in 240ms (View: 1, DB: 95) | 200 OK [https://redmine.open-bio.org/github_hook]

from redmine_github_hook.

koppen avatar koppen commented on September 28, 2024

Could you give this command a shot and see it'll work:

git fetch origin '+refs/heads/*:refs/heads/*'

It's taken from #8 which might fix your issue. I'd appreciate it if you could try to patch your plugin and verify that pull request

from redmine_github_hook.

cjfields avatar cjfields commented on September 28, 2024

This seems to work, but I'm not sure how backwards-compatible it is. A simple 'git fetch' worked just as well (note the update at the bottom of this page).

from redmine_github_hook.

koppen avatar koppen commented on September 28, 2024

Great, thanks. I've pushed the above fetch change plus better (well, actual) handling of git errors to the git_errors branch. Could you give that branch a shot on your Redmine and see if it fixes both your issues, please, before I merge to master.

As for backwards compatibility it works on my machine with git 1.5.

from redmine_github_hook.

cjfields avatar cjfields commented on September 28, 2024

That works; I'll close this out. Thanks!

from redmine_github_hook.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.