Skip to content
This repository was archived by the owner on Mar 22, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@

## How to Use

# via Bundle URLs
### Via prebuilt docker image
You can use the prebuilt docker image that is based on the official langflow image but include the ClearPoint langflow-lib and the required dependencies.

```bash
docker run --rm -it -p 7860:7860 ghcr.io/clearpointnz/langflow-lib:v0.1.0
```

### via Bundle URLs
Components can be pulled into your Langflow instance by setting the `LANGFLOW_BUNDLE_URLS` environment variable to the URL of this repository.

For example:
Expand All @@ -13,8 +20,9 @@ Note: The command above will not persist any workflows or configuration. Use for

Many of these components require additional Python packages to be installed. These will need to be available in your Langflow instance. See the `comps_requirements.txt` file for a list of dependencies.

# Via custom docker image
Alternatively you can build a custom docker container with the depencies and the components installed. For example:

### Via custom docker image
Alternatively you can build a custom docker container with the dependencies and the components installed. For example:

``` dockerfile
FROM langflowai/langflow:latest
Expand All @@ -33,4 +41,8 @@ COPY components/ /app/components/
ENV LANGFLOW_COMPONENTS_PATH=/app/components

CMD ["langflow", "run"]
```
```

## Development
You can use the included Docker compose file to build and run langflow with the components for testing and development. It includes creation of a volume for persisting data and configuration.

19 changes: 14 additions & 5 deletions components/ClearPoint Jira/jira_add_comment.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,25 @@ class JiraAddCommentComponent(Component):
Output(
name="results",
display_name="Results",
method="add_issue",
method="add_comment_to_issue",
info="The results of the Jira comment add operation."
)
]

def add_issue(self) -> Data:
def add_comment_to_issue(self) -> Data:
# HACK: make copy of inputs to avoid race condition. not guareenteed to work. See https://github.com/langflow-ai/langflow/issues/8791
issue_key = self.issue_key
comment_text = self.comment_text

# create the JIRA client
jira = JIRA(server=self.JIRA_SERVER_URL, basic_auth=(self.JIRA_USERNAME, self.JIRA_API_KEY))

results = jira.add_comment(self.issue_key,self.comment_text)
# add the comment to the issue
response = jira.add_comment(issue_key, comment_text)

# build a results payload
results = {"comment_id": response["id"], "status": "Comment added successfully"}

self.status = results.raw
return Data(data=results.raw)
self.status = results.results
return Data(data=results.results)

19 changes: 13 additions & 6 deletions components/ClearPoint Jira/jira_add_label.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,25 @@ class JiraAddLabelToIssueComponent(Component):
]

def add_label(self) -> Data:
# HACK: make copy of inputs to avoid race condition. not guareenteed to work. See https://github.com/langflow-ai/langflow/issues/8791
issue_key = self.issue_key
label = self.label

# create the JIRA client
jira = JIRA(server=self.JIRA_SERVER_URL, basic_auth=(self.JIRA_USERNAME, self.JIRA_API_KEY))

# grab the issue
issue = jira.issue(self.issue_key)
# grab the current labels for the issue
issue = jira.issue(issue_key, fields='labels')

# add the label to the issue
issue.fields.labels.append(self.label)
issue.fields.labels.append(label)

# update issue with the new label
issue.update(fields={"labels": issue.fields.labels})

issue = jira.issue(self.issue_key) # load the updated issue so we can get raw data TODO: add logic to avoid this second call
# build a results payload
results = {"issue_key": issue_key, "labels": issue.fields.labels, "status": "Label added successfully"}

self.status = issue.raw
return Data(data=issue.raw)
self.status = results
return Data(data=results)

17 changes: 14 additions & 3 deletions components/ClearPoint Jira/jira_search_issues_component.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,17 @@ class JiraSearchIssuesComponent(Component):
]

def search_issues(self) -> List[Data]:
# HACK: make copy of inputs to avoid race condition. not guareenteed to work. See https://github.com/langflow-ai/langflow/issues/8791
jql_query = self.jql_query
issue_fields = self.issue_fields

# create the JIRA client
jira = JIRA(server=self.JIRA_SERVER_URL, basic_auth=(self.JIRA_USERNAME, self.JIRA_API_KEY))


issues = jira.search_issues(self.jql_query, fields=self.issue_fields,json_result=True)
# do the search
issues = jira.search_issues(jql_query, fields=self.issue_fields,json_result=True)

# build list of issues, flattening fields if requested
issues_list = []
for issue in issues["issues"]:

Expand All @@ -85,11 +91,16 @@ def search_issues(self) -> List[Data]:
return issues_list

def build_dataframe(self) -> DataFrame:
# trigger the saerch
issues = self.search_issues()

# convert results to list of dict
rows = []
for issue in issues:
rows.append(dict(issue.data))

# convert list of dict to DataFrame
df_result = DataFrame(rows)
self.status = df_result # store in self.status for logs

self.status = df_result
return df_result
18 changes: 18 additions & 0 deletions compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Docker compose file for local dev/testing of langflow-lib with peristence of config/flows
services:
langflow:
build: .
# container is set up to run as user so need to run as root so that can write to config dir
user: root
# tty true so taht all logs are printed
tty: true
ports:
- "7860:7860"
environment:
- LANGFLOW_CONFIG_DIR=/app/langflow
- LANGFLOW_SAVE_DB_IN_CONFIG_DIR=true
- DO_NOT_TRACK=true
volumes:
- langflowlib-dev-data:/app/langflow
volumes:
langflowlib-dev-data: