mirror of
https://github.com/dogkeeper886/ollama-k80-lab.git
synced 2025-12-09 23:37:07 +00:00
Update work flow.
This commit is contained in:
268
dify/Jira2Md.yml
Normal file
268
dify/Jira2Md.yml
Normal file
@@ -0,0 +1,268 @@
|
||||
app:
|
||||
description: ''
|
||||
icon: 🤖
|
||||
icon_background: '#FFEAD5'
|
||||
mode: workflow
|
||||
name: Jira2Md
|
||||
use_icon_as_answer_icon: false
|
||||
dependencies:
|
||||
- current_identifier: null
|
||||
type: marketplace
|
||||
value:
|
||||
marketplace_plugin_unique_identifier: langgenius/jira:0.0.1@6e48c77165a5bf21ad2a7fa2c73599468acc528706bc5dcbdd5e44d57e01c50b
|
||||
kind: app
|
||||
version: 0.3.0
|
||||
workflow:
|
||||
conversation_variables: []
|
||||
environment_variables: []
|
||||
features:
|
||||
file_upload:
|
||||
allowed_file_extensions:
|
||||
- .JPG
|
||||
- .JPEG
|
||||
- .PNG
|
||||
- .GIF
|
||||
- .WEBP
|
||||
- .SVG
|
||||
allowed_file_types:
|
||||
- image
|
||||
allowed_file_upload_methods:
|
||||
- local_file
|
||||
- remote_url
|
||||
enabled: false
|
||||
fileUploadConfig:
|
||||
audio_file_size_limit: 50
|
||||
batch_count_limit: 5
|
||||
file_size_limit: 15
|
||||
image_file_size_limit: 10
|
||||
video_file_size_limit: 100
|
||||
workflow_file_upload_limit: 10
|
||||
image:
|
||||
enabled: false
|
||||
number_limits: 3
|
||||
transfer_methods:
|
||||
- local_file
|
||||
- remote_url
|
||||
number_limits: 3
|
||||
opening_statement: ''
|
||||
retriever_resource:
|
||||
enabled: true
|
||||
sensitive_word_avoidance:
|
||||
enabled: false
|
||||
speech_to_text:
|
||||
enabled: false
|
||||
suggested_questions: []
|
||||
suggested_questions_after_answer:
|
||||
enabled: false
|
||||
text_to_speech:
|
||||
enabled: false
|
||||
language: ''
|
||||
voice: ''
|
||||
graph:
|
||||
edges:
|
||||
- data:
|
||||
isInIteration: false
|
||||
isInLoop: false
|
||||
sourceType: start
|
||||
targetType: tool
|
||||
id: 1747817616323-source-1747883690530-target
|
||||
source: '1747817616323'
|
||||
sourceHandle: source
|
||||
target: '1747883690530'
|
||||
targetHandle: target
|
||||
type: custom
|
||||
zIndex: 0
|
||||
- data:
|
||||
isInLoop: false
|
||||
sourceType: tool
|
||||
targetType: code
|
||||
id: 1747883690530-source-1747819131717-target
|
||||
source: '1747883690530'
|
||||
sourceHandle: source
|
||||
target: '1747819131717'
|
||||
targetHandle: target
|
||||
type: custom
|
||||
zIndex: 0
|
||||
- data:
|
||||
isInLoop: false
|
||||
sourceType: code
|
||||
targetType: end
|
||||
id: 1747819131717-source-1747817691653-target
|
||||
source: '1747819131717'
|
||||
sourceHandle: source
|
||||
target: '1747817691653'
|
||||
targetHandle: target
|
||||
type: custom
|
||||
zIndex: 0
|
||||
nodes:
|
||||
- data:
|
||||
desc: ''
|
||||
selected: false
|
||||
title: Start
|
||||
type: start
|
||||
variables:
|
||||
- label: Jira Key ID
|
||||
max_length: 48
|
||||
options: []
|
||||
required: true
|
||||
type: text-input
|
||||
variable: key
|
||||
height: 89
|
||||
id: '1747817616323'
|
||||
position:
|
||||
x: -122
|
||||
y: -10
|
||||
positionAbsolute:
|
||||
x: -122
|
||||
y: -10
|
||||
selected: false
|
||||
sourcePosition: right
|
||||
targetPosition: left
|
||||
type: custom
|
||||
width: 244
|
||||
- data:
|
||||
desc: ''
|
||||
outputs:
|
||||
- value_selector:
|
||||
- '1747819131717'
|
||||
- text
|
||||
variable: text
|
||||
selected: false
|
||||
title: End
|
||||
type: end
|
||||
height: 89
|
||||
id: '1747817691653'
|
||||
position:
|
||||
x: 91.10621346264634
|
||||
y: 263.9997295634268
|
||||
positionAbsolute:
|
||||
x: 91.10621346264634
|
||||
y: 263.9997295634268
|
||||
selected: false
|
||||
sourcePosition: right
|
||||
targetPosition: left
|
||||
type: custom
|
||||
width: 244
|
||||
- data:
|
||||
code: "import re\n\n\ndef atlassian_to_markdown(text: str) -> str:\n \"\
|
||||
\"\"\n Converts Atlassian wiki-style markup to standard Markdown.\n \
|
||||
\ \"\"\"\n\n # Normalize line breaks\n text = text.replace('\\\\\
|
||||
n', '\\n').replace('\\r\\n', '\\n')\n\n # Bold text: +*text*+ → **text**\n\
|
||||
\ text = re.sub(r'\\+\\*(.+?)\\*\\+', r'**\\1**', text)\n\n # Headings:\
|
||||
\ h1. → #, h2. → ##, etc.\n text = re.sub(r'^h([1-6])\\.\\s+', lambda\
|
||||
\ m: '#' *\n int(m.group(1)) + ' ', text, flags=re.MULTILINE)\n\
|
||||
\n # Blockquotes: > lines\n text = re.sub(r'^\\s*>', '>', text, flags=re.MULTILINE)\n\
|
||||
\n # Image conversion: !URL|params! → \n text = re.sub(r'!([^\\\
|
||||
|!]+)\\|[^!]*!', r'', text)\n\n # Escaped dividers to markdown\
|
||||
\ horizontal rules\n text = re.sub(r'\\\\[-]+', '---', text)\n\n #\
|
||||
\ Remove extra Unicode whitespace characters (e.g., non-breaking spaces)\n\
|
||||
\ # note: the space before \\t is a non-breaking space\n text = re.sub(r'[ \\\
|
||||
t]+', ' ', text)\n\n # Collapse multiple blank lines to a maximum of\
|
||||
\ 2\n text = re.sub(r'\\n{3,}', '\\n\\n', text)\n\n # Strip trailing\
|
||||
\ spaces\n text = '\\n'.join(line.rstrip() for line in text.splitlines())\n\
|
||||
\n return text.strip()\n\n\ndef format_comments_display(comments: list)\
|
||||
\ -> str:\n \"\"\"\n Format a list of comments to simple markdown\
|
||||
\ with display name and converted body.\n \"\"\"\n output = []\n \
|
||||
\ for comment in comments:\n name = comment.get(\"author\", {}).get(\"\
|
||||
displayName\", \"Unknown Author\")\n body_raw = comment.get(\"body\"\
|
||||
, \"\")\n body_md = atlassian_to_markdown(body_raw)\n output.append(f\"\
|
||||
### {name}\\n\\n{body_md}\\n\")\n return \"\\n---\\n\".join(output)\n\
|
||||
\n\ndef main(jira_response: list) -> dict:\n \"\"\"Formats JSON data\
|
||||
\ into a Jira-style ticket string (simplified format).\"\"\"\n issue\
|
||||
\ = jira_response[0][\"issue\"]\n jira_ticket = issue[\"key\"]\n description\
|
||||
\ = atlassian_to_markdown(issue[\"fields\"][\"description\"])\n comments\
|
||||
\ = format_comments_display(issue[\"fields\"][\"comment\"][\"comments\"\
|
||||
])\n summary = issue[\"fields\"][\"summary\"]\n ticket = f\"\"\"\n\
|
||||
## Jira Ticket\n{jira_ticket}\n\n## Title\n{summary}\n\n## Description\n\
|
||||
{description}\n\n## Comment\n{comments}\n\"\"\"\n\n return {\n \
|
||||
\ \"text\": ticket\n }\n"
|
||||
code_language: python3
|
||||
desc: ''
|
||||
outputs:
|
||||
text:
|
||||
children: null
|
||||
type: string
|
||||
selected: false
|
||||
title: FORMAT RAW DATA
|
||||
type: code
|
||||
variables:
|
||||
- value_selector:
|
||||
- '1747883690530'
|
||||
- json
|
||||
variable: jira_response
|
||||
height: 53
|
||||
id: '1747819131717'
|
||||
position:
|
||||
x: -11.190539821206812
|
||||
y: 171.25540547079942
|
||||
positionAbsolute:
|
||||
x: -11.190539821206812
|
||||
y: 171.25540547079942
|
||||
selected: true
|
||||
sourcePosition: right
|
||||
targetPosition: left
|
||||
type: custom
|
||||
width: 244
|
||||
- data:
|
||||
desc: ''
|
||||
is_team_authorization: true
|
||||
output_schema: null
|
||||
paramSchemas:
|
||||
- auto_generate: null
|
||||
default: null
|
||||
form: llm
|
||||
human_description:
|
||||
en_US: The Key of the Jira issue to retrieve details for (e.g., 'PROJ-123').
|
||||
ja_JP: The Key of the Jira issue to retrieve details for (e.g., 'PROJ-123').
|
||||
pt_BR: O ID ou a chave da issue a ser recuperada.
|
||||
zh_Hans: 要获取详情的 Jira 问题的 Key (例如 'PROJ-123')。
|
||||
label:
|
||||
en_US: Issue Key
|
||||
ja_JP: Issue Key
|
||||
pt_BR: ID ou Chave da Issue
|
||||
zh_Hans: 问题 Key
|
||||
llm_description: The unique key (e.g., 'PROJ-123') for the Jira issue for
|
||||
which details are requested. This field is mandatory.
|
||||
max: null
|
||||
min: null
|
||||
name: issue_key
|
||||
options: []
|
||||
placeholder: null
|
||||
precision: null
|
||||
required: true
|
||||
scope: null
|
||||
template: null
|
||||
type: string
|
||||
params:
|
||||
issue_key: ''
|
||||
provider_id: langgenius/jira/jira
|
||||
provider_name: langgenius/jira/jira
|
||||
provider_type: builtin
|
||||
selected: false
|
||||
title: Get Jira Issue Details
|
||||
tool_configurations: {}
|
||||
tool_description: Retrieves details for a specific Jira issue.
|
||||
tool_label: Get Jira Issue Details
|
||||
tool_name: get_issue
|
||||
tool_parameters:
|
||||
issue_key:
|
||||
type: mixed
|
||||
value: '{{#1747817616323.key#}}'
|
||||
type: tool
|
||||
height: 53
|
||||
id: '1747883690530'
|
||||
position:
|
||||
x: -64.33288254138103
|
||||
y: 98.39009010462206
|
||||
positionAbsolute:
|
||||
x: -64.33288254138103
|
||||
y: 98.39009010462206
|
||||
selected: false
|
||||
sourcePosition: right
|
||||
targetPosition: left
|
||||
type: custom
|
||||
width: 244
|
||||
viewport:
|
||||
x: 390.2310455880614
|
||||
y: 151.7367457365153
|
||||
zoom: 0.796640096285583
|
||||
@@ -166,7 +166,7 @@ workflow:
|
||||
positionAbsolute:
|
||||
x: 231
|
||||
y: 455
|
||||
selected: false
|
||||
selected: true
|
||||
sourcePosition: right
|
||||
targetPosition: left
|
||||
type: custom
|
||||
@@ -189,7 +189,7 @@ workflow:
|
||||
positionAbsolute:
|
||||
x: 344
|
||||
y: 617
|
||||
selected: true
|
||||
selected: false
|
||||
sourcePosition: right
|
||||
targetPosition: left
|
||||
type: custom
|
||||
|
||||
Reference in New Issue
Block a user