AxisCommunications / backstage-plugins

Backstage Plugins Created by Axis Communications
MIT License
32 stars 17 forks source link

Add support for multiple Jira instances #202

Closed grantila closed 3 weeks ago

grantila commented 1 month ago

Multi instance support

This PR adds support for multiple Jira instances. The configuration format can be used as today, or by adding an instances array of Jira instances, as described in the README changes.

Context

For companies using multiple Jira instances, this PR enables them to use this. One instance can be called default, in which case entities don't need to specify the instance, ~and for other entities, the annotation jira.com/instance is used~ otherwise the project-key can be prefixed with instance-name/ similar to the SonarQube configuration.

Issue ticket number and link

Checklist before requesting a review

changeset-bot[bot] commented 1 month ago

πŸ¦‹ Changeset detected

Latest commit: 9fb6f13041d1272e5c4b5acdeb80375b6a2f59bf

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages | Name | Type | | --------------------------------------------- | ----- | | @axis-backstage/plugin-jira-dashboard-backend | Minor | | @axis-backstage/plugin-jira-dashboard-common | Minor | | @axis-backstage/plugin-jira-dashboard | Minor | | backend | Patch | | app | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

grantila commented 4 weeks ago

Fixed the prettier and build issues, and also changed from having a separate annotation for other-than-default Jira instances, to be able to prefix the project-key annotation with the instance name instead.

The reasoning was to be closer to how other plugins do it, but also that when looking closer at your code, it seems that you might want to allow multiple project keys in the future (being comma separated). Coupling the instance and key in the same annotation will allow an entity to (again, in the future) be able to specify multiple projects in different Jira instances.

anicke commented 4 weeks ago

Nice, thank you! Looks good so far, I'll try to take a closer look soon!

henrik-koren commented 3 weeks ago

This is a very valuable enhancement My organization is looking for this feature Thanks @grantila for taking this task

anicke commented 3 weeks ago

Thank you @grantila! Let's :shipit:

chicobento commented 3 weeks ago

Thank you @grantila, that's awesome πŸŽ‰πŸŽ‰πŸŽ‰ @anicke et al., what are the current plans for the next release ?

anicke commented 3 weeks ago

@chicobento The github releases are broken but all packages have been published to npm! So please try it out!