דלג לתוכן הראשי

להגיב ב-GitHub

שלבgithub-commentnotifyהשפעה חיצונית

מגיב על issue או pull request. שלב שרץ שוב לא מגיב פעמיים. צריך באסימון את ההרשאה Issues (או Pull requests) Read and write.

במבט אחד​

מאפייןערך
שם השלבgithub-comment
משאבClusterStep (lumen.ai/v1alpha1)
קבוצה וקטגוריהnotify, github
קרדיטים0.5 קרדיטים בכל פעם שהוא מצליח
השפעה חיצוניתכן הוא משנה משהו מחוץ ל-Lumen, ולכן ניסיון חוזר שואל קודם, ובדיקה מראה מה הוא היה עושה במקום לעשות את זה.
ההתקנה צריכה לספקכלום

קלט​

מאפייןערך
צריךכלום
מפיקfields
עובד עלitem מסמך אחד בכל פעם

״צריך״ ו״מפיק״ הם סוגי נתונים (file, text, fields, email). העורך מציע שלב רק במקום שבו מה שהוא צריך כבר נמצא במסלול. ראו מסמכים ונתונים.

פלט​

צומת מאוחר יותר מפנה לפלט כ-{nodeId.field} בטקסט, או כ-nodeId.field בתנאי.

פלטסוג
repostring
numbernumber
commentIdstring
commentUrlstring

הגדרות​

מגדירים תחת config: בצומת של התהליך. הגדרות טקסט יכולות להכיל מצייני מקום כמו {nodeId.field}.

הגדרהסוגברירת מחדלתיאור
connectorRefstring-GitHub connectionminLength 1
repostring-owner/name, such as acme/website. Empty is the repository the flow started from.maxLength 200
numberstring-Empty is the one the flow started from.maxLength 100
bodyחובהstring-Markdown. Needs the token permission Issues (or Pull requests): Read and write.minLength 1; maxLength 60000

ה-JSON Schema המלא של ההגדרות: github-comment.schema.json.

דוגמה​

config
body: Thanks @{author}, we will look at this today.

שימוש בתהליך​

צומת שמריץ את github-comment נכנס תחת spec.nodes של Flow. תנו לו כל מזהה, ורשמו ב-next את מזהי הצמתים הבאים.

flow.yaml
apiVersion: lumen.ai/v1alpha1
kind: Flow
metadata:
name: github-comment-example
namespace: tenant-acme
spec:
displayName: "Comment on GitHub"
triggers:
- id: start
ref: {name: manual-run}
next: [github-comment]
nodes:
- id: github-comment
stepRef: {name: github-comment}
config:
body: Thanks @{author}, we will look at this today.