Renovate: Support Jira issues

Created on 22 May 2019  路  21Comments  路  Source: renovatebot/renovate

What would you like Renovate to be able to do?

Use Jira for Bitbucket Server for issues (e.g. config error notification, Master Issue, etc).

Describe the solution you'd like

Ideally Jira can be autodiscovered from Bitbucket Server and same credentials used, but otherwise we need additional configuration.

It is not yet known if this is feasible.

bitbucket priority-3-normal

Most helpful comment

Hi, I'm new to the Renovate community but stumbled upon this Issue. We're currently in the process of setting up Renovate in our company for Bitbucket Server and searched for this feature to create a new Jira Issue when dependencies need an update. I hope I'm in the right place for this.
I've got some experience in developing with Atlassian software in the sense that I've been working with the Atlassian ecosystem (Jira/Confluence/Bitbucket ) for the last year. I've had a look at this and found a REST-API that allows us to create issues through Bitbucket on Jira (https://docs.atlassian.com/bitbucket-server/rest/7.4.0/bitbucket-jira-rest.html#idp2l). The API works with the existing credentials that are required for bitbucket. As @viceice has already pointed out, you can discover the required Jira instance also using a REST call. For me, the URL was slightly different (GET rest/jira-integration/1.0/servers, same response) and I found no official documentation for this. I see that there are still some tricky things to consider. For example, you are required to have the project key for Jira but in general, I'm very optimistic that we could implement this.
I'm willing to invest some time into this as soon as we've got Renovate running for us.

All 21 comments

Do any Bitbucket Server users like @iamstarkov or @ViceIce have prior knowledge about this?

I've looked at it before, cause i've had the same idea. This should generally work, but jira don't use markdown, they have their own markup language

Markin - Markdown for Jira Cloud/Server could be an option to support markdown

I'm not too worried about converting our markdown to Jira format if we need to though. It should be a reasonably easy one-way translation

maybe this should be configurable for users, because the field renderer can be changed on project base.

so we have to configure the corresponding project anyway, because there is no direct link between a jira project and a bitbucket repository

So we can't "discover" an attached Jira server automatically - we'd need that configured in addition to the VCS endpoint? And perhaps also an additional username/password (token) if they are not shared across systems?

not as i'm aware of. rest apis

maybe there is some hidden rest api

@ViceIce did you ever get the issue tracker enabled on the repos on bitbucket server? i'm running bitbucket server and jira in docker and connected bitbucket with jira during the setup process and i don't seem to find anything related to issues.

You will see it, if any issue id is in commit message or pr

on pr:
image

on commit list:
image

i've added commitBody: '[VO-113]' to my config.js

on an jira issue:
image

VSAF-113 is my currently used virtual renovate master issue 馃槃

So we can't "discover" an attached Jira server automatically - we'd need that configured in addition to the VCS endpoint? And perhaps also an additional username/password (token) if they are not shared across systems?

Found a possibillity (maybe undocumented)

GET /rest/jira-integration/latest/servers

Response:

[
    {
        "id": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
        "name": "JIRA Sample",
        "displayUrl": "https:\/\/jira.example.com",
        "rpcUrl": "https:\/\/jira.example.com",
        "authenticated": true,
        "selected": true
    }
]

We can use this to find jira and enable issues.

Jira supported text formatings:
rhorber_jira-text-formatting-notation.pdf

Thinking about this, since the masterIssue looks like a dashboard (reference blog post), I wonder if Confluence might be a better spot this kind of thing?

But then thinking more broadly, maybe this could be generalised for any kind of wiki?

Complementary to masterIssue, perhaps there could be an option for wikiDashboard ?
This would then have its' own set of properties, e.g.

  • wikiPlatform
  • wikiEndpoint
  • wikiParent (e.g. store all the repo's dashboard pages under this page)

Alternative thinking, what if we could output README markdown files into a user configurable repo? Then let Bitbucket render the README.md files
e.g. renovate-bot-dashboard-repo/FOOPROJECT/bar-repo/README.md

Any of these ideas seem worth while?

The masterIssue is most powerful when it's in the same repo and the checkboxes work. Without that, it's of much less value. The biggest motivator for this would be for alerting to things like config errors.

Of course, I hadn't considered the interactivity side of it.

In that case, README markdown files aren't the way to go at all.

Maybe it does make sense to try and scope this to Confluence then, since it has a checkbox feature.
It would seem a better fit for this kind of dashboard than Jira for these reasons:

  • there's not a 1:1 match of Jira projects to Bitbucket repos in all the organisations I've worked at
  • usually, it's not good to have a long running, never completed story in Jira

Would also love to see a similar feature for integrating Renovate with Bitbucket cloud. Having this functionality would definitely help Renovate adoption within my team.

Would also love to see a similar feature for integrating Renovate with Bitbucket cloud. Having this functionality would definitely help Renovate adoption within my team.

How would you suggest?

Hi, I'm new to the Renovate community but stumbled upon this Issue. We're currently in the process of setting up Renovate in our company for Bitbucket Server and searched for this feature to create a new Jira Issue when dependencies need an update. I hope I'm in the right place for this.
I've got some experience in developing with Atlassian software in the sense that I've been working with the Atlassian ecosystem (Jira/Confluence/Bitbucket ) for the last year. I've had a look at this and found a REST-API that allows us to create issues through Bitbucket on Jira (https://docs.atlassian.com/bitbucket-server/rest/7.4.0/bitbucket-jira-rest.html#idp2l). The API works with the existing credentials that are required for bitbucket. As @viceice has already pointed out, you can discover the required Jira instance also using a REST call. For me, the URL was slightly different (GET rest/jira-integration/1.0/servers, same response) and I found no official documentation for this. I see that there are still some tricky things to consider. For example, you are required to have the project key for Jira but in general, I'm very optimistic that we could implement this.
I'm willing to invest some time into this as soon as we've got Renovate running for us.

@Mcluky we'd be very happy to have you contribute!

Probably the biggest question to answer first though is: what should be the scope of functionality? You may need to experiment with Renovate for a while before you form an opinion.

With GitHub and GitLab issues, we can use them to:

  • Alert the user if a critical config error prevents the running of Renovate (without this, users may not be aware that dependencies are no longer being updated)
  • Create issues for deprecated dependencies (this functionality is currently on hold as some bugs or misunderstandings in the initial code lead to duplicate issues being spammed in some scenarios)
  • Creating the "Dependency Dashboard"

The Dashboard is super useful, but it makes use of a "trick" with markdown checkboxes to achieve interactive functionality. I'm not sure if any same trick can be used in Jira, so then it would be a read-only dashboard instead.

Was this page helpful?
0 / 5 - 0 ratings