Skip to content
This repository has been archived by the owner on Jan 31, 2019. It is now read-only.

a tentative hook for technoweenie to fill in secret endpoints for rebuilding pages #196

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 18 additions & 0 deletions docs/github_pages
@@ -0,0 +1,18 @@
GitHub Pages
============

GitHub Pages is a service hook that lets you trigger Pages rebuilds from repository events. Just pick the events you want to trigger a rebuild with.


Developer Notes
---------------

data
- gollum
- issues
- issue_comment
- push
- commit_comment

payload
- refer to docs/github_payload
16 changes: 16 additions & 0 deletions services/github_pages.rb
@@ -0,0 +1,16 @@
require 'uri'

class Service::GitHubPages < Service
default_events :commit_comment, :gollum, :issues, :issue_comment, :push
boolean :gollum
boolean :issues
boolean :issue_comment
boolean :push
boolean :commit_comment

def receive_event
if data[event.to_s].to_i == 1
http_post "https://api.github.com/secret/", JSON.generate(payload)
end
end
end