Skip to content

feat: add a plugin bitbucket#2458

Merged
mindlesscloud merged 29 commits into
apache:mainfrom
thenicetgp:bitbucket
Aug 16, 2022
Merged

feat: add a plugin bitbucket#2458
mindlesscloud merged 29 commits into
apache:mainfrom
thenicetgp:bitbucket

Conversation

@thenicetgp
Copy link
Copy Markdown
Contributor

@thenicetgp thenicetgp commented Jul 9, 2022

PreChecklist

firstly you should create a app_password for your account
https://bitbucket.org/account/settings/app-passwords/

bitbucket.go run configuration example

go run bitbucket.go -c 1 -o thenicetgp -r lake

Summary

add bitbucket connection repo pr issue issue_comments pr_comments
add e2e tests: issue_test, pr_test, comment_test, account_test, repo_test, etc.

Does this close any open issues?

#2100

Screenshots

table "repos"

截屏2022-07-09 21 17 02

table "accounts"

截屏2022-08-16 09 47 06

table "issues"

截屏2022-08-16 09 44 56

table "pull_requests"

截屏2022-08-16 09 44 05

table "pull_request_comments"

截屏2022-08-16 09 45 52

table "issue_comments"

截屏2022-08-16 09 46 12

Other information

Thanks to @mindlesscloud for his guidance on my work.

@likyh
Copy link
Copy Markdown
Contributor

likyh commented Jul 9, 2022

Actually, you can convert a pr to a draft pr in the right pannel. 😁

@thenicetgp thenicetgp marked this pull request as ready for review July 15, 2022 05:35
@thenicetgp thenicetgp force-pushed the bitbucket branch 2 times, most recently from 8e8ac6f to 3d3f5e7 Compare July 17, 2022 14:58
@thenicetgp thenicetgp changed the title feat: add bitbucket connection and repo feat: add bitbucket connection repo pr and issue Jul 17, 2022
@thenicetgp thenicetgp changed the title feat: add bitbucket connection repo pr and issue feat: add a plugin bitbucket Jul 18, 2022
@thenicetgp thenicetgp force-pushed the bitbucket branch 2 times, most recently from 66c51f7 to 1d31ac2 Compare July 18, 2022 16:30
@keon94
Copy link
Copy Markdown
Contributor

keon94 commented Jul 25, 2022

Good work. Make sure you add e2e tests as well.

@thenicetgp
Copy link
Copy Markdown
Contributor Author

Good work. Make sure you add e2e tests as well.

thanks,I will add

@thenicetgp thenicetgp force-pushed the bitbucket branch 3 times, most recently from f615ba0 to 979b491 Compare August 4, 2022 01:19
}
}
// refdiff
if refdiffRules, ok := transformationRules["refdiff"]; ok {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'd make "refdiff" a global constant and put it in some shared package. The Github and Gitlab plugins also use it

Copy link
Copy Markdown
Contributor

@keon94 keon94 Aug 15, 2022

Choose a reason for hiding this comment

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

more generally, much of this transformation logic seems to be the same as those plugins. Would be good if you can refactor it into a common function. Otherwise, just the global constant will do as well.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

got it , thanks for your remind.

@keon94
Copy link
Copy Markdown
Contributor

keon94 commented Aug 15, 2022

Hi @thenicetgp, could you give an overall status update on this PR? Are there more changes you are working on?

@thenicetgp
Copy link
Copy Markdown
Contributor Author

Hi @thenicetgp, could you give an overall status update on this PR? Are there more changes you are working on?

Hi @keon94 , thank for your comment, this PR just add a plugin bitbucket, it can currently collect issues,pullrequests,accounts,repos,issue_comments and pr_comments. Domainlayer table accounts,repos,issue,pull_requests,issue_comments and pull_request_comments are filled. These tables have basically all the data they should have.
This PR makes no changes to the any other plugin.

Copy link
Copy Markdown
Contributor

@mindlesscloud mindlesscloud left a comment

Choose a reason for hiding this comment

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

LGTM

@mindlesscloud mindlesscloud merged commit f527fb5 into apache:main Aug 16, 2022
@thenicetgp thenicetgp deleted the bitbucket branch September 19, 2022 07:20
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.

4 participants