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 reuse atlassian commons module #5441

Merged
merged 6 commits into from
Feb 19, 2025

Conversation

san81
Copy link
Collaborator

@san81 san81 commented Feb 18, 2025

Description

When I added Confluence as a source, I moved the Atlassian authentication code to atlassian-commons module as the authentication methods for both jira and confluence are the same. Confluece is already making use of this common module and now with this PR, I am making jira to also relay on the common module. Deleted any redundant jira specific authentication code as it is fully reusing the code from atlassian-commons module.

Also, fixed the flow related OAuth2 while also reusing the code between Jira and Confluence

Majority of the code changes are deletes and import fixes. Out of 39 files changed in this PR, 20 of them are just file deletions.

Issues Resolved

Resolves #[Issue number to be closed when this PR is merged]

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.

Signed-off-by: Santhosh Gandhe <1909520+san81@users.noreply.github.com>
…opies

Signed-off-by: Santhosh Gandhe <1909520+san81@users.noreply.github.com>
Signed-off-by: Santhosh Gandhe <1909520+san81@users.noreply.github.com>
Signed-off-by: Santhosh Gandhe <1909520+san81@users.noreply.github.com>
@@ -0,0 +1,10 @@
package org.opensearch.dataprepper.plugins.source.atlassian.utils;
Copy link
Member

Choose a reason for hiding this comment

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

Missing copyright header.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks for catching this. Added copyright.

@@ -34,12 +34,12 @@
import static org.opensearch.dataprepper.plugins.source.atlassian.utils.Constants.SLASH;

/**
* The type Jira service.
* The type Atlassian OAuth2 service.
Copy link
Member

Choose a reason for hiding this comment

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

nit: should it be Atlassian OAuth2 Service Config

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Adjusted the comment

@@ -33,4 +33,8 @@ public class ConfluenceSourceConfig extends AtlassianSourceConfig implements Cra
@JsonProperty("acknowledgments")
private boolean acknowledgments = false;

@Override
Copy link
Member

Choose a reason for hiding this comment

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

Is there a set of tests for this file?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added a unit test

Signed-off-by: Santhosh Gandhe <1909520+san81@users.noreply.github.com>
@san81 san81 merged commit e0630ed into opensearch-project:main Feb 19, 2025
44 of 47 checks passed
divbok pushed a commit to divbok/data-prepper that referenced this pull request Feb 24, 2025
* jira making use of atlassian commons

* Making OAuth2 flow work for both Confluence and Jira

Signed-off-by: Santhosh Gandhe <1909520+san81@users.noreply.github.com>
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.

4 participants