Skip to content
Concourse resource for managing github webhooks
Branch: master
Clone or download
GavinFigueroa and billimek Choose hook events (#5)
* Test concourse source formatting

* Ignore IntelliJ files

* Use AJV for config validation

* Webhook equivalence uses config object

* Requests use api v3

* Parse events from resource config

* Cleanup

* Explicitly require ajv

* Sanitize input during validation

* Restructure project files

* Remove unnecessary quotes from event examples

* Update test location

* Sanitize events

* Move src to bin

* Add Apache file headers

* Cleanup

* Cleanup

* Remove ties to THD corporate
Latest commit c85e02c Mar 25, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin Choose hook events (#5) Mar 26, 2019
.gitignore
CONTRIBUTING.md
Dockerfile Use node:alpine for Docker image Nov 14, 2018
LICENSE Add license Nov 1, 2018
MAINTAINERS.md Add GitHub username to maintainer info Nov 29, 2018
README.md Choose hook events (#5) Mar 26, 2019
package-lock.json Choose hook events (#5) Mar 26, 2019
package.json Choose hook events (#5) Mar 26, 2019

README.md

Github Webhook Resource

This resource creates and deletes Github webhooks which point to resources in a Concourse pipeline. The github-webhook-resource can only manipulate webhooks which point to other resources in its containing pipeline.

Resource Type Configuration

resource_types:
- name: github-webhook-resource
  type: docker-image
  source:
    repository: homedepottech/github-webhook-resource
    tag: 'latest'

Source Configuration

resources:
- name: github-webhook
  type: github-webhook-resource
  source:
    github_api: https://github.example.com/api
    github_token: ((github-token))

Behavior

out: Manipulate a Github webhook

Create or delete a webhook using the configured parameters.

Parameters

- put: create-webhook
  resource: github-webhook
  params:
    org: github-org-name
    repo: github-repo-name
    resource_name: your-resource-name
    webhook_token: your-token
    operation: create
    events: [push, pull_request]
  • org: Required. Your github organization.
  • repo: Required. Your github repository.
  • resource_name: Required. Name of the resource to be associated with your webhook.
  • webhook_token: Required. Arbitrary string to identify your webhook. Must match the webhook_token property of the resource your webhook points to.
  • operation: Required.
    • create to create a new webhook. Ignores pre-existing webhooks.
    • delete to delete an existing webhook. Outputs current timestamp on non-existing webhooks.
  • events: Optional. An array of events which will trigger your webhook. Default: push

References:

You can’t perform that action at this time.