-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(issues): add support for jira cloud [WIP] #20559
Conversation
… issue integration
so the adding |
it doesn't resolve the mentioned issue. the issue is about using Jira for bitbucket server, not bitbucket Cloud |
created a new issue #20568 after clarifying that the previous issue was for bitbucket server + jira server only |
let's discuss things inside the issue |
… AST to avoid bringing in additional 3rd party deps
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please create a refactor PR first to add modules/issues/index, which provides the issue API. all calls can be forwarded to platform for first step.
the change all related code to call the issue API instead of platform directly.
lib/modules/issues/jira/utils.ts
Outdated
// const markdown = remark().use(github).process(description); | ||
|
||
/** | ||
* TODO: This is a naive implementation where we don't try to convert ADF back to markdown, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
idea, allow configure a custom multiline text field to store raw markdown on issue, so we only need to convert to ADF and not back?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That could certainly work - but that custom multiline text field would need to be setup per project which would be complicated at scale.
I've been experimenting with this branch and the naive implementation seems to be ok. the dashboard jira issue is updated on each run, which isn't such a bad thing imho. the last updated timestamp is a good reflection of how "current" the dashboard contents are :)
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
@@ -648,6 +649,13 @@ const options: RenovateOptions[] = [ | |||
default: true, | |||
supportedManagers: ['npm', 'composer'], | |||
}, | |||
{ | |||
name: 'issueCollector', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any recommendations on the new global configuration name to specify the issue collector? Also thought about issuePlatform
* TODO - What is the best way to retrieve these per repository to use in the Jira Issue Collector? | ||
* Retrieving this may vary between platforms(ie: Bitbucket repositories can be natively linked) | ||
*/ | ||
function getProjectKey(): string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm needing some advice on how best to configure the following for the Jira Issue Collector
-
jira project key for the repository.
- for bitbucket cloud, this can be fetched via a call to the /repositories/{repo}/jira/projects endpoint. how would this value be passed down to the issue collector logic?
- for other platform types, how would this work?
-
jira cloud url.
- similarly, this can be fetched from the bitbucket /jira/projects endpoint.
- for other platform types, how would this work?
setIssueCollectorApi(config); | ||
} | ||
|
||
function setIssueCollectorApi(config: AllConfig): void { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will use the configured issueCollector, or, fallback to the platform-type issues
|
||
export type IssueCollectorId = 'jira'; | ||
|
||
export abstract class IssueCollector implements IssueCollectorAPI { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are issues only used for dependency dashboards? If so, what if this interface was more dashboard exporter driven?
I ask because I built a patch onto our instance at Atlassian to export the dashboard to Confluence. I could port that logic to an exporter, but Issue Collector would clearly not fit that use case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A believe there are a handful of situations, but mainly Dependency dashboards, config errors etc at the moment...
I raised #20574 recently to capture the enhancement idea of supporting Confluence spaces - this seems to be similar to what you've done with your local patch @kwelch.
Very much open to better naming suggestions than issue collector.
Furthermore, for Jira Cloud, I'm interest to go beyond just a single dependency dashboard ticket and generate linked sub-tasks for each of the open PRs,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the context. I will see if I can spend some time on this during our upcoming tech debt week.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is also used for the config error issue .
and maybe more in future
Closing due to inactivity - trying to keep stale open PRs to a minimum as it's a negative sign to those browsing repos. This topic is welcome to be resumed at any time |
Changes
Note: This is a Draft PR. I am raising it early so that I can begin to get broader feedback and input.
Introduces issues module and adds support for Jira Cloud Issues.
Work still pending:
Dependency Dashboard
for any open PRs so they can be assigned and planned into team sprint commitments. This may be best as a separate follow-up PR as it adds net-new functionality.Context
Documentation (please check one with an [x])
How I've tested my work (please select one)
I have verified these changes via: