Skip to content

Instantly share code, notes, and snippets.

@dlorenc
Last active December 6, 2019 16:15
Show Gist options
  • Save dlorenc/fb4f3ee6a85e374131805f1829257b54 to your computer and use it in GitHub Desktop.
Save dlorenc/fb4f3ee6a85e374131805f1829257b54 to your computer and use it in GitHub Desktop.
apiVersion: tekton.dev/v1alpha1
kind: TriggerTemplate
metadata:
name: chatbot-template
spec:
params:
- name: repourl
description: The git repository url
- name: prurl
description: The url to the PR
- name: comment
description: The text of the comment
resourcetemplates:
- apiVersion: tekton.dev/v1alpha1
kind: TaskRun
metadata:
generateName: chatbot-run-
spec:
taskRef:
name: chatbot-task
inputs:
resources:
- name: repo
resourceSpec:
type: git
params:
- name: url
value: $(params.repourl)
- name: pr
resourceSpec:
type: pullRequest
params:
- name: url
value: $(params.prurl)
params:
- name: comment
value: $(params.comment)
- name: author_association
value: $(params.author_association)
outputs:
resources:
- name: pr
resourceSpec:
type: pullRequest
params:
- name: url
value: $(params.prurl)
secrets:
- secretName: github-token
secretKey: token
fieldName: authToken
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment