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

Another bitesize PR for gitlab compatibility #486

Merged

Conversation

DLu
Copy link
Contributor

@DLu DLu commented Sep 15, 2018

Two things:

  • Change so that the file at oauth_config_path i.e. ~/.config/bloom is overwritten as it is being written to. Appending to the file results in invalid json.
  • Save the name of the sever as server in order to determine which type of PR to make.

The next PR will have the actual gitlab interface.

Copy link
Contributor

@nuclearsandwich nuclearsandwich left a comment

Choose a reason for hiding this comment

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

I haven't tested the changes yet. But I do have one comment that may or may not require a change.

# Determine where the distro file is hosted...
distro_url = get_distribution_file_url(distro)
base_org, base_repo, base_branch, base_path = get_gh_info(distro_url)
if None not in [base_org, base_repo, base_branch, base_path]:
Copy link
Contributor

Choose a reason for hiding this comment

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

I know you've got later changes coming that might influence this but I preferred the previous expression of this condition:

if None in [base_org, base_repo, base_branch, base_path]:
    warning("Automated pull request only available via github.com")
    return
server = 'http://github.com'

makes me worry less that server could be undefined when used later.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

How would you feel about a more drastic change that looked like this: 44e0fa5

(not a complete change, but gives the idea)

Copy link
Contributor

Choose a reason for hiding this comment

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

How would you feel about a more drastic change that looked like this: 44e0fa5

I think moving in that direction makes sense. Short of an UpstreamPullRequest factory which spits out provider-specific objects with a common interface I think being able to delegate using a conditional that checks server domain is reasonable. I could also see wanting to extend the bloom config format so that mycode.lol can be configured to be a GitLab instance or BitBucket Server or whatever.

Copy link
Contributor

@nuclearsandwich nuclearsandwich left a comment

Choose a reason for hiding this comment

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

This commit or an equivalent one needs to be applied to this PR branch before it will run.

@nuclearsandwich
Copy link
Contributor

@DLu, Something that would help me review these pull requests in a timely fashion is if you could include in your pull request description what state you believe the branch to be in. My default assumption for open PRs is that they have at least passed "works on my machine" for the submitter. But when testing this branch bloom-release -h did not even run without errors.

I am happy collaborating to bring a pull request to mergeable status but like most developers, time is a scarce resource for me and I have a limited amount of time to allocate to bloom development and review. When what I estimate could be a quick review and validation unexpectedly takes longer it increases the delay before I can allocate new time to return to bloom.

My goal is for each of us to spend our time effectively; Not to push more work down the pipe in every case. Including a sentence like "I haven't tested this {at all,in all cases,...}." is extremely useful when estimating review time so I can allocate a contiguous block.

Thanks!

otamachan and others added 4 commits September 25, 2018 15:06
* Generate debian/copyright file from license tag

* Update catkin-pkg version

* Limit the skip logic only to copyright file
@DLu
Copy link
Contributor Author

DLu commented Sep 25, 2018

@nuclearsandwich My sincere apologies for causing the extra work for you. I had worked on the original PR more carefully, and did not give adequate attention to the PR Feedback. It was an improper balance of trying to respond to feedback quickly and doing the due dilligence.

With this latest set of commits, I have merged your change and the upstream changes, and fixed one minor bug. I have tested it with both a github and gitlab repo, and it works in the first case and properly complains in the second.

Again, I'm sorry, and will try to be more thorough in future PRs.

@nuclearsandwich
Copy link
Contributor

Thanks for the iterations @DLu. Looking forward to releasing the GitLab compatibility in the future.

@nuclearsandwich nuclearsandwich merged commit d8be9d1 into ros-infrastructure:master Sep 29, 2018
@DLu DLu mentioned this pull request Dec 4, 2018
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