Conversation
|
P.S. I've made two successful PRs with this code. |
There was a problem hiding this comment.
LGTM, pending the requirement change.
If you wanted to take this upstream and reduce the fork factor, you could remove the locus-convenience stuff (maybe have some kind of opt-in configuration options for repository url templating), and detect a gitlab rosdistro (maybe if 'gitlab' in server).
bloom/commands/release.py
Outdated
| return _gl | ||
| # Make sure we can import gitlab | ||
| try: | ||
| import gitlab |
There was a problem hiding this comment.
I think you can safely import this up top if you add it to https://github.com/locusrobotics/bloom/blob/locus-master/setup.py#L6, that should ensure dev machines pull the library down as well.
ayrton04
left a comment
There was a problem hiding this comment.
Wow! That's really handy. So now it behaves as it does when you bloom from a GitHub-based rosdistro?
|
@ayrton04 Pretty much, modulo where the credentials are saved and how the API is accessed. @ayrton04 @paulbovbel Then we could store the gitlab access key in I should note that the one other thing I did in the |
|
That all sounds very reasonable, especially if just sets the default and can be overriden during the If this is just for us, then ++1, if it's for upstream, you may just want to make a PR and work through it with '@'nuclearsandwich - I'm sure upstream would love to enable gitlab MRs, but they have a lot more use cases to consider than we do. |
|
The last two commits remove the git-tokens Locus-specific logic, and updates the gitlab interaction to be more in the same style of the github interaction. Also removes our specific patterns in favor of environment vars. Please take another look. |
bloom/commands/release.py
Outdated
| return config, oauth_config_path | ||
|
|
||
|
|
||
|
|
There was a problem hiding this comment.
Is this one too many line breaks?
There was a problem hiding this comment.
ERROR: Too many linting errors for me to notice this one.
Thanks.
|
Thank you. PR opened upstream ros-infrastructure/bloom#458 |
(plus one thing that just annoys me)
pullmerge requests for gitlab!http://gitlab-ci-token:TOKEN@gitlab.locusbots.io/locusrobotics/REPOSITORY-release.gitas the release repository if it exists.trackis the same asrosdistroThe gitlab portions will only work if you have
pip install python-gitlab. The github portions use a custom interface to the api (i.e. not pygithub or similar). I don't know if that's to avoid the dependency. Furthermore, the gitlab portions are probably not ready to be merged to upstream since additional logic is probably needed for seeking out the right token, rather than assuming it is installed in~/.git-tokens