feat: jira connector (cloud) (#1238)
This connector:
- takes a Jira Cloud URL, user email and api token; to authenticate into
Jira Cloud
- ingests:
- either all issues in all projects in a Jira Cloud Organization
- or
- issues in user specified projects, boards
- user specified issues
- processes this kind of data:
- text fields such as issue summary, description, and comments
- dropdown fields such as issue type, status, priority, assignee,
reporter, labels, and components
- other data such as issue id, issue key, project id, information on
subtasks
- notes down attachment URLs, however does not process attachments
- stores each downloaded issue in a txt file, in a predefined template
form (consisting of the data above)
- then processes each downloaded issue document into elements using
unstructured library
- related to: https://github.com/Unstructured-IO/unstructured/issues/263
To test the changes, make the necessary setups and run the relevant
ingest test scripts.
---------
Co-authored-by: ryannikolaidis <1208590+ryannikolaidis@users.noreply.github.com>
Co-authored-by: ahmetmeleq <ahmetmeleq@users.noreply.github.com>
2023-09-06 13:10:48 +03:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
# Processes all the issues in all projects within a jira domain, using the `unstructured` library.
|
|
|
|
|
|
|
|
# Structured outputs are stored in jira-ingest-output
|
|
|
|
SCRIPT_DIR=$(dirname "$(realpath "$0")")
|
|
|
|
cd "$SCRIPT_DIR"/../../.. || exit 1
|
|
|
|
|
|
|
|
# Required arguments:
|
|
|
|
# --url
|
|
|
|
# --> Atlassian (Jira) domain URL
|
|
|
|
# --api-token
|
|
|
|
# --> Api token to authenticate into Atlassian (Jira).
|
|
|
|
# Check https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/ for more info.
|
|
|
|
# --user-email
|
|
|
|
# --> User email for the domain, such as xyz@unstructured.io
|
|
|
|
|
|
|
|
# Optional arguments:
|
|
|
|
# --list-of-projects
|
|
|
|
# --> Space separated project ids or keys
|
|
|
|
# --list-of-boards
|
|
|
|
# --> Space separated board ids or keys
|
|
|
|
# --list-of-issues
|
|
|
|
# --> Space separated issue ids or keys
|
|
|
|
|
|
|
|
# Note: When any of the optional arguments are provided, connector will ingest only those components, and nothing else.
|
|
|
|
# When none of the optional arguments are provided, all issues in all projects will be ingested.
|
|
|
|
|
|
|
|
PYTHONPATH=. ./unstructured/ingest/main.py \
|
2023-12-18 23:48:21 -08:00
|
|
|
jira \
|
|
|
|
--metadata-exclude filename,file_directory,metadata.data_source.date_processed \
|
|
|
|
--url https://unstructured-jira-connector-test.atlassian.net \
|
|
|
|
--user-email "$JIRA_USER_EMAIL" \
|
|
|
|
--api-token "$JIRA_API_TOKEN" \
|
|
|
|
--output-dir jira-ingest-output \
|
|
|
|
--num-processes 2 \
|
|
|
|
--reprocess
|
2023-12-11 20:04:15 -05:00
|
|
|
# --list-of-projects <your project keys/ids here (space separated)> \
|
|
|
|
# --list-of-boards <your board keys/ids here (space separated)> \
|
|
|
|
# --list-of-issues <your issue keys/ids here (space separated)> \
|