-
Notifications
You must be signed in to change notification settings - Fork 14
Stash interface #106
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
base: master
Are you sure you want to change the base?
Stash interface #106
Conversation
|
It seems this build will fail until this is resolved: cosmin/stashy#62 |
|
for testing purposes in the PR i think it's okay to have it depend directly on the git repo. for merging i'd be okay with depending on the git repo if we can find a way to make it optional so that things dont break if you dont have a connection to github. |
| return False | ||
|
|
||
| @staticmethod | ||
| def format_message(message): |
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 wonder if this should be moved to the parent class or to a utility module. thoughts?
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.
Well, the implementation here is slightly different from github.py because the structure of comments in the stash API is different. I couldn't think of a good way to extract the shared logic from what is unique to each interface. Any suggestions?
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.
ah i didn't notice the difference, nevermind
inlineplz/main.py
Outdated
| repo: Repository name | ||
| pr: Pull request ID | ||
| token: Authentication for repository | ||
| username: (If not using token) username for repository |
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.
Oops, that's wrong. Should be user
|
|
||
|
|
||
| class StashInterface(InterfaceBase): | ||
| def __init__(self, project, repo, pr, auth, url=None): |
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.
prospector: pylint: Too many arguments (6/5) (too-many-arguments)
871ecff to
f371d36
Compare
| # -*- coding: utf-8 -*- | ||
| from __future__ import absolute_import | ||
|
|
||
| import stashy |
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.
prospector: pylint: Unable to import 'stashy' (import-error)
|
|
||
| STASH_SUPPORTED = False | ||
| try: | ||
| from inlineplz.interfaces.stash import StashInterface |
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.
why do this for an internal dependency?
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.
Because this internal dependency has an external dependency (stashy) that does not support python 3.5.
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.
hmm, could we instead do the try/except within the stash interface, wrapping stashy? and should we maybe just dump stashy and write a custom wrapper for the stash API endpoints we need?
Added interface for Atlassian Stash