Skip to content

Conversation

@raphaelcastaneda
Copy link
Collaborator

Added interface for Atlassian Stash

@raphaelcastaneda
Copy link
Collaborator Author

It seems this build will fail until this is resolved: cosmin/stashy#62
The (really outdated) version of Stashy on PyPI has a conflicting requirement for requests, and is missing some API endpoints we're using. I'll need to specify stashy>=0.3

@guykisel
Copy link
Owner

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):
Copy link
Owner

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?

Copy link
Collaborator Author

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?

Copy link
Owner

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

repo: Repository name
pr: Pull request ID
token: Authentication for repository
username: (If not using token) username for repository
Copy link
Collaborator Author

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):
Copy link
Owner

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)

Raphael Castaneda added 5 commits March 16, 2016 15:31
This reverts commit ad9f6c7.
It turns out the offset I saw was due to failing to merge before running
inline-plz during my testing
# -*- coding: utf-8 -*-
from __future__ import absolute_import

import stashy
Copy link
Owner

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
Copy link
Owner

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?

Copy link
Collaborator Author

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.

Copy link
Owner

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?

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