Skip to content

Conversation

@waszqba
Copy link

@waszqba waszqba commented Dec 3, 2025

This doesn't change the init procedure, but enables advanced users to add multiple project keys in the config.yaml so they can see issues from more than one project in the default view without appending a custom query every time they want to see a dashboard.

This doesn't change the init procedure, but enables advanced users to add multiple project keys in the config.yaml so they can see issues from more than one project in the default view without appending a custom query every time they want to see a dashboard.
Copilot AI review requested due to automatic review settings December 3, 2025 16:00
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces support for multi-project filtering in JQL queries by detecting when the project parameter contains multiple projects (formatted with parentheses) and adjusting the JQL syntax accordingly. This allows advanced users to manually configure multiple project keys in their config.yaml file to view issues from multiple projects without appending custom queries each time.

  • Adds logic to detect multi-project format (strings starting and ending with parentheses) in NewJQL()
  • Dynamically selects the appropriate JQL format string based on single vs. multi-project input
  • Changes the filter initialization to use the selected format

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 27 to 38
func NewJQL(project string) *JQL {
var f string
if strings.HasPrefix(project, "(") && strings.HasSuffix(")") {
f = "project=%q"
} else {
f = "project in %s"
}
return &JQL{
project: project,
filters: []string{fmt.Sprintf("project=%q", project)},
filters: []string{fmt.Sprintf(f, project)},
}
}
Copy link

Copilot AI Dec 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test coverage for this file indicates that new functionality should be tested. There are no tests for the multi-project filter support introduced in this PR. Add test cases that verify the JQL output for both single project (e.g., "TEST") and multi-project formats (e.g., "(TEST, PROJ2)").

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant