Skip to content
This repository has been archived by the owner on Oct 29, 2024. It is now read-only.

feat: add Jira component #205

Merged
merged 29 commits into from
Jul 28, 2024
Merged

Conversation

YCK1130
Copy link
Collaborator

@YCK1130 YCK1130 commented Jul 9, 2024

Because

This commit

  • Support get boards/issue/epic/sprint

TODO

  • TASK_LIST_BOARDS: list all boards in Jira
  • TASK_LIST_ISSUES: list issues in Jira by various methods
  • TASK_GET_ISSUE: get an issue by ID or key
    • Note: This API can get issue/epic with the key since they use the same indexing system.
  • TASK_GET_SPRINT: get a sprint by ID

Next PR

  • create issue
  • create epic
  • create sprint

Added by @chuang8511 to visualise Jira's design
image

application/jira/v0/boards.go Fixed Show fixed Hide fixed
application/jira/v0/issues.go Fixed Show fixed Hide fixed
@YCK1130
Copy link
Collaborator Author

YCK1130 commented Jul 9, 2024

MEMO:

After some investigation, OAuth2, a more secure authentication method, seems incompatible with our use case. Thus, I use the basic token authentication method for the user to access the API.

docs:
REST API docs
OAuth2
Basic auth

@YCK1130 YCK1130 force-pushed the YCK1130/jira-component branch 2 times, most recently from b02936c to 73a130f Compare July 17, 2024 11:25
@YCK1130 YCK1130 marked this pull request as ready for review July 17, 2024 13:14
@YCK1130
Copy link
Collaborator Author

YCK1130 commented Jul 17, 2024

Debug logger will be deleted after the review process is nearly complete.

Copy link
Member

@chuang8511 chuang8511 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I finished my first review. Thanks for your work.

I want to share with you a general idea about coding.
You can take a look and pick up something you feel make sense.

I always feel writing code should be like writing articles because

  1. In addition to running code in the computer, other developers will review & refer to code. So, it means the code itself also should be as much readable as possible. And, the structure of code (article) should be clear for human.
  2. Ideally, we should write the document. But, sometimes we do not have resource. So, I feel code itself should be a good document. It usually brings us good maintainability.

We do sometimes need to code in the language of the computer, but there are always ways to restructure it to make others better to read and understand.

It is my learning from my previous company and senior members.
Just want to share them with you.

application/jira/v0/config/definition.json Outdated Show resolved Hide resolved
application/jira/v0/config/definition.json Show resolved Hide resolved
application/jira/v0/config/tasks.json Show resolved Hide resolved
application/jira/v0/config/tasks.json Show resolved Hide resolved
application/jira/v0/config/tasks.json Show resolved Hide resolved
application/jira/v0/config/tasks.json Outdated Show resolved Hide resolved
application/jira/v0/config/tasks.json Outdated Show resolved Hide resolved
application/jira/v0/debug.go Show resolved Hide resolved
application/jira/v0/main.go Show resolved Hide resolved
application/jira/v0/issues.go Outdated Show resolved Hide resolved
Copy link
Member

@chuang8511 chuang8511 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@YCK1130
Left a few comments.

Others LGTM. Please take out debugger if we won't need them.
And, please also make sure this PR can make you create a pipeline that serves marketing purpose.

Because, in v0, there is no insert function, which we cannot fulfil the original story, I think you can bring out other stories.

Looking forward to seeing it!

"properties": {
"project-key-or-id": {
"default": "",
"title": "Project Key or ID",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important.
I forgot if I mentioned here.
But, please make sure how the users get project key or id.

application/jira/v0/main.go Show resolved Hide resolved
"TASK_GET_SPRINT"
],
"documentationUrl": "https://www.instill.tech/docs/component/application/jira",
"icon": "assets/Jira.svg",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jira.svg

@donch1989 donch1989 merged commit 51f3ed7 into instill-ai:main Jul 28, 2024
6 checks passed
donch1989 pushed a commit that referenced this pull request Jul 31, 2024
🤖 I have created a release *beep* *boop*
---


##
[0.24.0-beta](v0.23.0-beta...v0.24.0-beta)
(2024-07-31)


### Features

* add audio operator
([#236](#236))
([fe8abff](fe8abff))
* add handler to auto-fill missing default values
([#210](#210))
([dcad3f0](dcad3f0))
* add HubSpot component
([#199](#199))
([b3936a8](b3936a8))
* add Jira component
([#205](#205))
([51f3ed7](51f3ed7))
* add Ollama component
([#224](#224))
([810f850](810f850))
* add sql component
([#193](#193))
([9a373f3](9a373f3))
* add token count for each chunk
([#235](#235))
([bb69104](bb69104))
* add video operator to fulfil unstructured data process
([#238](#238))
([a1459d7](a1459d7))
* **document:** add docx doc pptx ppt html to transform to text in
markdown format
([#232](#232))
([2932db9](2932db9))
* **document:** move ConvertToText task from text operator to document
operator ([#248](#248))
([699ca70](699ca70))
* introduce event handler interface
([#253](#253))
([9599b42](9599b42))
* **restapi:** recategorize the restapi component as a generic component
([#249](#249))
([fbfc3a3](fbfc3a3))
* **website:** add scrape sitemap function
([#239](#239))
([8648326](8648326))


### Bug Fixes

* bug of duplicate document
([#256](#256))
([e028a6e](e028a6e))
* bug of json without setting array for images
([#259](#259))
([4aeae69](4aeae69))
* change md format to html tag for correct frontend link
([#240](#240))
([7e16b2b](7e16b2b))
* revert the alias because they are same as package name
([#243](#243))
([1d9c42d](1d9c42d))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
chuang8511 pushed a commit that referenced this pull request Aug 23, 2024
Because

- We need actions to complete the user story

This commit

- Provide a draft json schema of each task

8/12 Update
I have implemented all functions to connect to the real API and found
some tasks are related to some APIs that are not compatible with the
current version of Jira. The remaining tasks are:
- TASK_CREATE_ISSUE
- TASK_UPDATE_ISSUE
- TASK_CREATE_SPRINT
- TASK_UPDATE_SPRINT

--------------
7/31 Update
@chuang8511 Hi, I added three more tasks and moved the schema from v1 to
v0 as #205 is merged. There are 5 new tasks now:
- TASK_CREATE_ISSUE
- TASK_UPDATE_ISSUE
- TASK_CREATE_SPRINT
- TASK_UPDATE_SPRINT
- TASK_RANK_EPIC

--------------
7/25
Note that only the last 3 tasks need to be reviewed, as the others are
under review at #205
- TASK_CREATE_ISSUE
- TASK_UPDATE_ISSUE
- TASK_MOVE_ISSUE_TO_EPIC
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Status: 👋 Done
Development

Successfully merging this pull request may close these issues.

4 participants