-
Notifications
You must be signed in to change notification settings - Fork 0
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 git branch finder and test #14
Conversation
'GitPlugin': { | ||
'code_dir': 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.
What about having the config in the plugin list? As in plugin list contains tuples with class name (str) and config (dict).
BTW what made you keep all the separate lists of plugins, instead of a single data structure?
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.
The motivation behind the separate lists was to do with attempting to make customizing configuration easier. But actually, it only reduces the pain without solving it.
But since we're thinking about db-driven per-user configuration this is probably a non-issue now.
Re: your question - what about creating a repo in github for the sole purpose of using it in But if we want to push to it, I guess the github API supports creation of repos as well. You can create one with a random name. |
I've created a dummy repo - I'll use that in the tests. For now there's no pushing to the repo anyway. |
…m into dev_alex Conflicts: deploystream/settings.py
|
||
|
||
SOURCE_CODE_PLUGINS = [ | ||
('deploystream.providers.git_plugin.plugin.GitPlugin', {}), | ||
('deploystream.providers.git_provider.GitProvider', GIT_CONFIG), |
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.
The reason for the git_provider name rather than git is because git is also the name of a library that we use.
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.
yeah I remember that problem from gdfabric and storyboard
@txels: this is ready for review now... |
@@ -20,7 +23,17 @@ def get_repo_branches_involved(self, feature_id): | |||
1: branch name | |||
2: latest commit | |||
""" | |||
return [] # no info available for now | |||
# Every folder in side self.code_dir that is a git repo will be looked |
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.
inside
?
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.
fixed
out |
I've added the regexing. If this doesn't cover a use case that you are thinking of then perhaps we should have a chat about it? |
OK maybe we should chat or I should add some example, because what you did is very different from what I had in mind. |
I'm up for chatting about it tomorrow (sat) morning. Does that work for you?
|
OK, well seems like you're not around online at the moment and I need to head off shortly. At the moment the core code calls So a question is "who should own the breaking up of a feature id into parts that can be matched in branch names". And I guess that could live up in the core code, and then the
and then the provider itself is configured with the template regex for branch finding. eg But I think fundamentally we need to get on the same page over which part of the system is responsible for what - and I'm very unclear as to the purpose of your desire for |
That is the gist of it. The VCS provider code should not know about features, only branches. In the scheme I had in mind, an upper layer would call it only with a list of strings to match for a specific case. I would make it look like: # VCS
def get_branches(self, regexes=None):
"""
regexes == None - return all branches
regexes == list of strings: branches whose name matches any of the regexes
"""
...
On a specific case (story 347) it could get called with: regexes = ["^staging$", "^rc_us347", "^us347", "^us347.*_dev_.*"] # GD
regexes = ["^develop$", "^\w+/347-.*"] # RBX The concrete list of matchers would be built by a higher level, not the VCS plugin itself, where project rules or conventions (such as branch naming and structure, etc) would be defined. I do not mean this is how it should be, just how I was thinking it would end up being. |
BTW I'm happy to merge this as it is, I think we will figure out the right APIs when implementing end to end stories (as happened with feature list). Let's define an end-to-end story that uses this code. |
@txels
This is now a full-blown PR