reviewdog / reviewdog

🐶 Automated code review tool integrated with any code analysis tools regardless of programming language
https://medium.com/@haya14busa/reviewdog-a-code-review-dog-who-keeps-your-codebase-healthy-d957c471938b#.8xctbaw5u
MIT License
7.78k stars 412 forks source link

Add BitBucket E2E testing flow #798

Open haya14busa opened 3 years ago

haya14busa commented 3 years ago

Follow up on #113 and https://github.com/reviewdog/reviewdog/pull/769#pullrequestreview-511159258.

btw, it's ok not to do it in this PR, but do you think it's possible to create some E2E test flow for bitbucket integration? For example, I created a mirror repo in GitLab and the pipeline automatically runs when creating a pr to reviewdog and we can check the reviewdog result in GitLab as well. Can we create a similar flow for bitbucket?

haya14busa commented 3 years ago

@Trane9991 Do you think you can work on some tasks? Especially for the 3rd one which creates BitBucket pull request automatically on push? I guess many tasks need some admin work, so I can help as well. I can invite you to the bitbucket reviewdog workspace as admin as well.

taraspos commented 3 years ago

Yup will be glad to. The only concern, if I will have enough free time to work on this, but I don't think it is urgent so should be fine.

Especially for the 3rd one which creates BitBucket pull request automatically on push?

Actually, this is nice, but kind of optional, because bitbucket stores requests per commit, so if we will configure pushing to bitbucket, this would be enough to see the generated reports: bitbucket pipeline panel So this should be enough for the "initial implementation" because if we don't need to create some custom action to open PRs, this means much less work.

But creating PR still would be nice, to be able to see how it looks on the PR UI, with the annotations, etc.

I can invite you to the bitbucket reviewdog workspace as admin as well.

Yes, this would help.

However, I was wondering how the PRs from Forks tested with GitLab? Does it create a new branch for each fork, test it, and then remove the branch once PR is merged? Or leaves it there?

Optional: Report the BitBucket pipeline result (or just URL) as GitHub Pull Request Status.

This would probably require calling GitHub API from the Bitbucket Pipeline, which should be easy enough.

haya14busa commented 3 years ago

Actually, this is nice, but kind of optional, because bitbucket stores requests per commit, so if we will configure pushing to bitbucket, this would be enough to see the generated reports:

Good point! Just reporting reviewdog results to a commit is good enough for the initial integration.

However, I was wondering how the PRs from Forks tested with GitLab? Does it create a new branch for each fork, test it, and then remove the branch once PR is merged? Or leaves it there?

Good question. The answer is that we don't run the test with GitLab for the forked repo because it depends on GitLab mirroring feature now. As you mentioned it, maybe we can create a new branch for the forked repo for BitBucket E2E test as well if we manually sync the repo with GitHub Actions, but it requires to read secret BitBucket access token if we simply listen to the pull-request event, so it's actually not so simple. Maybe supporting tests for the forked repo is optional. We can still manually sync the repo and run the tests if we receive PR related to BitBucket changes as well.

Cleaning up branches/PRs is optional I guess. I just leave branches/merge-requests in GitLab as is for now. 😃

I can invite you to the bitbucket reviewdog workspace as admin as well. Yes, this would help.

Can you tell me your bitbucket account name or email?

taraspos commented 3 years ago

Same as here :) https://bitbucket.org/Trane9991/

haya14busa commented 3 years ago

Oh... It looks like I need an email to invite members to BitBucket workspace... image

Can you tell me an email? If you don't want to make it public, maybe we can use Twitter DM (https://twitter.com/__haya14busa__) or discussion on reviewdog org.