Skip to content
This repository has been archived by the owner on Oct 13, 2020. It is now read-only.

FLOWPLUGIN-8577 Webhook processing script #11

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ dependencies {
implementation 'org.kohsuke:github-api:1.95'
implementation 'com.electriccloud.plugins:flowpdf-groovy-lib:1.1.1.0'

//That's ours
//implementation 'com.electriccloud:commander-api-bindings:9.0.0-SNAPSHOT'
//That's ours (you can uncomment this for local testing)
// implementation 'com.electriccloud:commander-api-bindings:9.0.0-SNAPSHOT'
}


Expand Down
97 changes: 72 additions & 25 deletions config/pluginspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pluginInfo:
pluginName: EC-Github
version: 3.3.0
version: 3.4.0
description: CloudBees CD integration for Github API
author: Polina
authorUrl: [email protected]
Expand All @@ -27,18 +27,16 @@ properties:
- propertyName: ec_webhook
credentialProtected: true
properties:
- propertyName: displayName
value: GitHub
- propertyName: procedureName
value: webhook
- propertyName: script
value:
path: dsl/properties/ec_webhook/script.groovy
- propertyName: setupProcedure
value: SetupWebhook
- propertyName: ec_polling
properties:
displayName: GitHub
- propertyName: default
properties:
- propertyName: displayName
value: GitHub
- propertyName: procedureName
value: webhook
- propertyName: script
value: '$[/myProject/ec_webhook/script.groovy]'
- propertyName: setupProcedure
value: SetupWebhook

procedures:
- name: SetupWebhook
Expand All @@ -63,28 +61,77 @@ procedures:
# this is a webhook backing procedure (gives form for the webhook)
parameters:
- name: repositories
label: Repositories
documentation: List of repositories, separated by a newline. Leave empty to process events for all the repositories where the webhook is set up.
type: textarea
documentation: List of repositories, separated by a newline.
required: false
- name: pushEvent
label: Process Push Events?
type: checkbox
label: Process Push?
documentation: Processes push events
- name: prEvent
type: checkbox
label: Process Pull Request?
- name: prAction
type: textarea
dependsOn: prEvent
condition: ${prEvent == "true"}
documentation: The action that was performed. Can be one of opened, edited, closed, assigned, unassigned, review_requested, review_request_removed, ready_for_review, labeled, unlabeled, synchronize, locked, unlocked, or reopened. If the action is closed and the merged key is false, the pull request was closed with unmerged commits. If the action is closed and the merged key is true, the pull request was merged.
documentation: Check this if you want trigger to be run when the new commit appears in one of the monitored branches.
- name: includeBranches
label: Include Branches
documentation: |
List of branch names, separated by a comma.
Incoming events will be discarded if not relate to one of the specified branches.
Leave empty to process events for all branches except ones specified in the “excludeBranches” parameter.
type: textarea
dependsOn: pushEvent
condition: ${pushEvent == "true"}
condition: ${pushEvent} == "true"
- name: excludeBranches
label: Exclude Branches
type: textarea
documentation: |
List of branch names, separated by a comma.
Incoming events will be discarded if relate to one of the specified branches.
Leave empty to process events for all branches or only for the specified in the "Include Branches".
required: false
dependsOn: pushEvent
condition: ${pushEvent} == "true"
- name: prEvent
label: Process Pull Requests?
documentation: |
Check this if you want the trigger to be run when Pull Request event occurs
type: checkbox
required: false
- name: includePrActions
type: textarea
dependsOn: prEvent
condition: ${prEvent} == "true"
documentation: |
The action that was performed. Can be one of:
<ul><li>opened</li>
<li>edited</li>
<li>closed_merged</li>
<li>closed_discarded</li>
<li>assigned</li>
<li>unassigned</li>
<li>review_requested</li>
<li>review_request_removed</li>
<li>ready_for_review</li>
<li>labeled</li>
<li>unlabeled</li>
<li>synchronize</li>
<li>locked<li>
<li>unlocked</li>
<li>reopened</li>
</ul>
- name: commitStatusEvent
label: Process Commit Status Events?
type: checkbox
documentation: Check this if you want trigger to be run when a commit status has been changed.
required: false
- name: includeCommitStatuses
label: Include Commit Status Events
type: textarea
documentation: |
Limit to following commit statuses. Comma-separated list with following statuses:
<ul>
<li>pending</li>
<li>success</li>
<li>failure</li>
<li>error</li>
</ul>

- name: Create Repository
description: Creates a GitHub Repository
Expand Down
Loading