Skip to content
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

Jira Source Configuration and Filter Changes and add license headers #5306

Merged
merged 8 commits into from
Jan 9, 2025

Conversation

Galactus22625
Copy link
Member

@Galactus22625 Galactus22625 commented Jan 2, 2025

Description

add license header to jira source files
Change Configuration Structure for Jira Source.
Implement Include and Exclude Filters for Jira Source.

Configuration changed to the following structure:

 source:
    jira:
        hosts: ["https://jiraurl.atlassian.net/"]
        authentication: 
            basic:
                username: some_username
                password: some_password
            oauth2:
                client_id: some_client_id
                client_secret: some_secret
                access_token: some_token
                refresh_token: some_refresh_token
        filter:
            project:
                key:
                    include: 
                    - "BEE"
                    - "OPT"
                    exclude: 
                    - "abc"
                    - "xyz"
            issue_type:
                include: 
                    - "Sub-task"
                exclude: 
                    - "abc"
                    - "xyz"
            status: 
                include: 
                    - "In Progress"
                    - "Assinged"
                exclude: 
                    - "Resolved"

Check List

  • New functionality includes testing.
  • New functionality has a documentation issue. Please link to it in this PR.
    • New functionality has javadoc added
  • Commits are signed with a real name per the DCO

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@Galactus22625 Galactus22625 changed the title Jira source Jira Source Configuration and Filter Changes Jan 2, 2025
@Galactus22625 Galactus22625 marked this pull request as ready for review January 2, 2025 22:38
.collect(Collectors.joining(DELIMITER, PREFIX, SUFFIX)))
.append(CLOSING_ROUND_BRACKET);
}
if (!CollectionUtils.isEmpty(JiraConfigHelper.getIssueTypeFilter(configuration))) {
jiraQl.append(ISSUE_TYPE_IN).append(JiraConfigHelper.getIssueTypeFilter(configuration).stream()
if (!CollectionUtils.isEmpty(JiraConfigHelper.getProjectNameExcludeFilter(configuration))) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think, you should also add additional validation where a project listed in include is not listed in exclude and vice versa

Copy link
Member Author

Choose a reason for hiding this comment

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

will add to validate Project Filters

@@ -76,6 +77,7 @@ public static JiraSourceConfig createJiraConfigurationFromYaml(String fileName)
return objectMapper.readValue(inputStream, JiraSourceConfig.class);
} catch (IOException ex) {
log.error("Failed to parse pipeline Yaml", ex);
System.out.println("mewo mewo mewo");
Copy link
Collaborator

Choose a reason for hiding this comment

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

Probably you forgot to remove this!

Copy link
Member Author

Choose a reason for hiding this comment

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

oops :/

Signed-off-by: Maxwell Brown <[email protected]>
Copy link
Collaborator

@san81 san81 left a comment

Choose a reason for hiding this comment

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

Thank you for taking care of these changes

@@ -1,16 +1,14 @@
package org.opensearch.dataprepper.plugins.source.jira;
Copy link
Member

Choose a reason for hiding this comment

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

Can you please add the license header. This should be added to all the files.

See: https://github.com/opensearch-project/data-prepper/blob/main/CONTRIBUTING.md#license-headers

Copy link
Member Author

Choose a reason for hiding this comment

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

added to all jira source files

@Galactus22625 Galactus22625 changed the title Jira Source Configuration and Filter Changes Jira Source Configuration and Filter Changes and add license headers Jan 8, 2025
@Galactus22625 Galactus22625 requested a review from sb2k16 January 8, 2025 20:31
@sb2k16 sb2k16 merged commit bad172c into opensearch-project:main Jan 9, 2025
46 of 47 checks passed
@Galactus22625 Galactus22625 deleted the jira-source branch January 17, 2025 21:27
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.

3 participants