renovatebot / renovate

Home of the Renovate CLI: Cross-platform Dependency Automation by Mend.io
https://mend.io/renovate
GNU Affero General Public License v3.0
17.67k stars 2.33k forks source link

Support Jira Cloud Issues for Bitbucket.org #20568

Open setchy opened 1 year ago

setchy commented 1 year ago

What would you like Renovate to be able to do?

Support the use of Jira Cloud as the issue tracking system when paired with Bitbucket Cloud (bitbucket.org), which is a very common Atlassian Cloud combination.

Initially, issues would support those currently implemented (e.g. config error notification, dependency dashboard, etc).

Additionally, It would be great if issues were created for each open PR so that they could be assigned and planned into team sprint commitments/deliverables.

If you have any ideas on how this should be implemented, please tell us here.

I have a functional initial implementation available here https://github.com/renovatebot/renovate/pull/20559 - though it needs some further work and more importantly broader input.

Some items to discuss and agree upon include:

How many issue collectors should be supported per Bitbucket Cloud repository? A Bitbucket Cloud repository can have more than one issue collector configured at a time, including

We should discuss and agree upon how these permutations are handled (ie: only support at most 1 issue collector per repository, support any number of linked issue collectors, etc)

Jira Cloud API endpoint and version In my research I have discovered that there are multiple endpoints in which one could integrate with Jira Cloud, including:

Type Version Example Comments
Jira Cloud Tenant API version 3 https://someorg.atlassian.net/rest/api/3/issues supports rich text fields via Atlassian Document Format (ADF), an Atlassian extension on top of prosemirror. version 3 endpoints are the latest available and currently flagged as beta (has been for some considerable time now - since ~2018)
Jira Cloud Tenant API version 2 https://someorg.atlassian.net/rest/api/2/issues same collection as v3, but without support for Atlassian Document Format (ADF) fields. Markdown supported via rich text fields.
Jira Cloud version 3 https://api.atlassian.com/ex/jira/{{cloudId}}/rest/api/3/issue/ as above
Jira Cloud version 2 https://api.atlassian.com/ex/jira/{{cloudId}}/rest/api/2/issue/ as above
Bitbucket Cloud internal APIs https://api.bitbucket.org/internal/repositories/{{repoWorkspace}}/{{repoName}}//jira/projects/issues?cloud_id={{cloudID}} limited collections available, undocumented, all internal-only for Bitbucket Jira plugins

I have spent considerable time evaluating each of the above API options for viability, and recommend using the Jira Cloud Tenant API (version 2 or version 3)

Portability to other platforms Ideally, this Jira Cloud integration should set a foundation which could be extended later to cover other platform pairings with some additional work.

Is this a feature you are interested in implementing yourself?

Yes

viceice commented 1 year ago

ideally this feature is platform independent, so the code should not reside inside bitbucket platform.

maybe it can reside inside modules/issues/jira, so we can later extend it to use other issue trackers.

a global config option should configure the issue platform, default to build-in (current behavior).

the worker code should call the appropriate functions.

platform code can check the issue platform type and extract the Jira target instance when in use.

viceice commented 1 year ago

i think we should only support a single Jira target project, which should be configurable when not determined from platform.

setchy commented 1 year ago

ideally this feature is platform independent, so the code should not reside inside bitbucket platform.

maybe it can reside inside modules/issues/jira, so we can later extend it to use other issue trackers.

I like this suggestion. For my understanding, how many issue collectors does Renovate currently support? GitHub, Gitea, Gitlab and Bitbucket Issues? Any others? Do you foresee the issue logic for these also moving into /modules/issues/<name>?

setchy commented 1 year ago

i think we should only support a single Jira target project, which should be configurable when not determined from platform.

Agree to limiting to a single Jira target project - keeps it nice and simple.

jcook-uptycs commented 1 year ago

ideally this feature is platform independent, so the code should not reside inside bitbucket platform. maybe it can reside inside modules/issues/jira, so we can later extend it to use other issue trackers. a global config option should configure the issue platform, default to build-in (current behavior).

This would be good. I'm looking to use this with GitHub. We use Jira for issues and have GitHub issues disabled.

Cjewett commented 1 year ago

@setchy is there any feedback you're looking for from Jira and Bitbucket users to move this forward? We're interested in seeing this one completed (to get to Data Center and Server) and I'd be willing to learn Renovate and test if needed.

MarcusElevait commented 1 year ago

We recently changed our base branch in bitbucket from develop to main. It seems like renovate hasn't recognized this change and is still targeting the PRs for the updates to our develop branch.

Manligheten commented 1 year ago

I could assist with some feedback too if needed, as I would like to move away from our hacky script that ties together the Renovate PRs with some Jira issues.

DaPutzy commented 12 months ago

as I would like to move away from our hacky script that ties together the Renovate PRs with some Jira issues.

Could you share this script somewhere? :) Everything is better than having no dashboard at all!

shahla-hafez commented 9 months ago

Hi, any update on this issue?