GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - vrish88/push_handler: An easy way for a non-github repository to notify 3rd party services (like Campfire, Jira, Jabber, etc) that there's been a push.

BranchesTags
Open more actions menu

Latest commit

 

History

31 Commits
31 Commits

Folders and files

NameName
Last commit message
Last commit date
lib
lib
 
 
spec
spec
 
 
.document
.document
 
 
.gitignore
.gitignore
 
 
Gemfile
Gemfile
 
 
Guardfile
Guardfile
 
 
LICENSE.txt
LICENSE.txt
 
 
README.md
README.md
 
 
Rakefile
Rakefile
 
 
VERSION
VERSION
 
 
push_handler.gemspec
push_handler.gemspec
 
 

Repository files navigation

PushHandler

PushHandler takes push information and converts it into a format that Github Services can read and distribute.

Config

  1. Download and install Github Services
  2. Start the Sinatra server by running ruby github-services.rb
  3. Install the gem gem install push-handler
  4. In .git/hooks/ directory of your repository, create a file called post-receive.
  5. Add the following text to post-receive, filling in your information:
#!/usr/bin/ruby
require 'rubygems'
require 'push_handler'

# Through STDIN git passes us: <oldrev> <newrev> <refname>
args = STDIN.readlines.first.split(/\s+/)

PushHandler.configure do |config|
  config.repo = {
    # Where to see the repository on the web
    'url' => 'http://git.example.com',

    # Repository name
    'name' => 'Suppa Time',

    # Directory on the machine where the contents of your .git folder lives
    'working_dir' => '/mnt/suppa_time.git/',

    # True if 'working_dir' is pointing to a bare repository
    'is_bare' => true,

    # Repository owner contact info
    'owner' => {
      'name' => 'Big Boss Man',
      'email' => '[email protected]'
    }
  }

  # Links to objects in your repository. Put the wildcard '%s' where the reference should go.
  config.urls['commit'] = 'http://git.example.com/commits?id=%s'    # '%s' will be replaced with the commit sha
  config.urls['branch'] = 'http://git.example.com/branches?id=%s'   # '%s' will be the branch name

  # The url that the github-services server is running.
  config.services['url'] = 'http://localhost:8080'

  # This is your configuration for 3rd parties.
  config.services['data'] = {
    'hipchat' => {
      'auth_token' => '9082afake90210',
      'room' => 12345,
      'notify' => true
    }
  }
end

PushHandler.send_to_services(*args)

Note

To see the parameters that each service requires you'll have to:

  1. Go to the github-services/ directory
  2. Execute rake services:config
  3. Open config/services.json and look up the requirements

About

An easy way for a non-github repository to notify 3rd party services (like Campfire, Jira, Jabber, etc) that there's been a push.

Resources

Readme
MIT license
Activity

Stars

3 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.