Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add teambition plugin #4704

Merged
merged 13 commits into from
Mar 24, 2023
Merged

feat: add teambition plugin #4704

merged 13 commits into from
Mar 24, 2023

Conversation

coldgust
Copy link
Member

@coldgust coldgust commented Mar 18, 2023

Summary

All tasks have been completed.

tasks:

  • connection and auth
  • account corresponding to teambition member
  • issue_labels corresponding to teambition tags(标签)
  • issue_comments corresponding to teambition task activity(任务动态)
  • issue_changelogs corresponding to teambition task activity(任务动态)
  • issue_worklogs corresponding to teambition task worktime(任务工时)
  • boards corresponding to teambition project(项目)
  • board_issues corresponding to teambition project_task
  • sprint_issues corresponding to teambition sprint_task
  • sprints corresponding to teambition sprints(迭代)
  • board_sprints corresponding to teambition project_sprints
  • issue_type corresponding to teambition scenario(任务类型)
  • issue_status corresponding to teambition taskflowstatus(工作流状态)
  • issue corresponding to teambition task(任务)
  • blueprint
  • e2e test

Does this close any open issues?

Closes #1882

Screenshots

Snipaste_2023-03-21_20-38-13
Snipaste_2023-03-21_20-38-34

Other Information

After I finish the plugin development, I will also finish the config-ui development.

@coldgust coldgust marked this pull request as draft March 18, 2023 09:46
@coldgust coldgust marked this pull request as ready for review March 21, 2023 15:40
@likyh likyh self-requested a review March 22, 2023 09:43
@likyh
Copy link
Contributor

likyh commented Mar 22, 2023

Hi, Have you finished?

@likyh
Copy link
Contributor

likyh commented Mar 22, 2023

I find timeAfter and iscremental haven't been used correctly.

https://github.com/apache/incubator-devlake/blob/main/backend/plugins/github/tasks/issue_collector.go#L76-L81

We should use like this to support collect after the timeAfter or collect incremently.

If not, we can use normal collector. Or maybe you want to add them next PR?

@coldgust
Copy link
Member Author

coldgust commented Mar 22, 2023

Hi, @likyh . Thanks for your review. The PR is finished.
I found that the Teambition api dose not provide date query params. So, I remove that code and use normal collector instead temporarily. If I find the right solution, I will impl it in next PR.

@likyh
Copy link
Contributor

likyh commented Mar 22, 2023

@coldgust Hi there, I have a few questions:

  1. I noticed that OrganizationId is only used when collecting accounts. Can we retrieve it after the project collector has run? This would make it easier to support it in config-ui when there is only one ID option available.

  2. Are you using it in blueprint advance mode?

  3. It seems like all projects are being collected. Shouldn't we only collect what we need? This would make it easier to support teambition in config-ui.

Also, do you have willing to add support for some API in config-ui in the future? (not in this PR)

@likyh
Copy link
Contributor

likyh commented Mar 22, 2023

I have rebased this PR to the latest main. Please pull(rebase) in your local repo.

@likyh likyh force-pushed the feat-teambition branch from 2d29fd8 to f7a7349 Compare March 22, 2023 15:58
@coldgust
Copy link
Member Author

Hi, @likyh

  1. All teambition api about getting account detail info are need OrganizationId. The project collector api only can get the userIds. But it has a trick to remove OrganizationId param. The TenantId(included in connection info) is equal to OrganizationId, cause teambition only support the organization tenant type. In summary, OrganizationId can get from connection.
  2. Yes, I use advanced mode.
  3. We can only get the project that correspond to the projectId params.
  4. Yes, I am willing to add support for some API in config-ui in the future.

I will add a commit to impl 1 & 3 later.

likyh
likyh previously approved these changes Mar 23, 2023
Copy link
Contributor

@likyh likyh left a comment

Choose a reason for hiding this comment

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

LGTM, I'll merge it.

@likyh likyh merged commit 1e1a50a into apache:main Mar 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a plugin for Teambition
2 participants