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

Add client cert support and new action #39

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

viveksyngh
Copy link

This PR adds support for client cert based authentication for the JIRA client.

It also adds tow new actions which are

  1. update_reporter
  2. add_watcher

Copy link
Contributor

@nmaludy nmaludy left a comment

Choose a reason for hiding this comment

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

General comments:

  • Thank you very much for this PR, overall looking good
  • Please remove the "cosmetic" changes, it artificially inflates the size of the PR
  • Please unit tests for the new functionality
  • Please add a CHANGELOG.md entry with the updated changes
  • Please add these new actions and functionality (client certs) to the README
  • Please bump the version in pack.yaml by 0.1.0 since new features were added.

Thanks again!

super(JIRASensor, self).__init__(sensor_service=sensor_service,
config=config,
poll_interval=poll_interval)
super(JIRASensor, self).__init__(
Copy link
Contributor

Choose a reason for hiding this comment

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

Would prefer to keep cosmetic changes like this to a minimum, makes the PR artificially large. I notice there are several more as well.

self._rsa_key = self._read_cert(rsa_cert_file)
self._poll_interval = self._config.get('poll_interval', self._poll_interval)
self._poll_interval = self._config.get(
Copy link
Contributor

Choose a reason for hiding this comment

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

More cosmetic changes

type: "string"
issue_type:
type: "string"
class_name: "JIRASensor"
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like all cosmetic changes

actions/add_watcher.py Outdated Show resolved Hide resolved
'UpdateReporterValue'
]


Copy link
Contributor

Choose a reason for hiding this comment

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

Would like to see unit tests for these new actions.

Copy link
Author

Choose a reason for hiding this comment

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

I don't see unit tests for individual action that are already existing. could you please help me understanding, what are you expecting from those unit tests, since most of these actions are connecting to JIRA API and returning result ?

@@ -41,29 +42,39 @@ def setup(self):
self._jira_url = self._config['url']
auth_method = self._config['auth_method']

options = {'server': self._config['url'],
Copy link
Contributor

Choose a reason for hiding this comment

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

Would like to see unit tests for these new options.

Copy link
Author

Choose a reason for hiding this comment

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

I have already added these configurations in test fixtures which is being used my tests to run the test.

Signed-off-by: Vivek Singh <[email protected]>
Signed-off-by: Vivek Singh <[email protected]>
@CLAassistant
Copy link

CLAassistant commented May 11, 2022

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
0 out of 2 committers have signed the CLA.

❌ gmenie-ak
❌ viveksyngh
You have signed the CLA already but the status is still pending? Let us recheck it.

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