-
Notifications
You must be signed in to change notification settings - Fork 1
/
chatbot-trigger.yaml
51 lines (51 loc) · 1.23 KB
/
chatbot-trigger.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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