Skip to content
This repository was archived by the owner on Jan 31, 2019. It is now read-only.

update and fix icescrum service#1219

Closed
vbarrier wants to merge 24 commits intogithub:masterfrom
vbarrier:master
Closed

update and fix icescrum service#1219
vbarrier wants to merge 24 commits intogithub:masterfrom
vbarrier:master

Conversation

@vbarrier
Copy link
Contributor

@vbarrier vbarrier commented Aug 5, 2017

  • Fix bug with access_token
  • update tests
  • update doc

@vbarrier vbarrier changed the title update ice scrum service update and fix icescrum service Aug 5, 2017
Copy link
Contributor

@bswinnerton bswinnerton left a comment

Choose a reason for hiding this comment

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

Hi @vbarrier,

It looks like there are a number of failing tests with the addition of this PR. If we can get those passing, we can give this a proper review ❤️.

@vbarrier
Copy link
Contributor Author

vbarrier commented Aug 8, 2017

Hi @bswinnerton Thank you for your comment. I didn't notice the errors! They have been fixed :)
Thank you for your review :)

Copy link
Contributor

@bswinnerton bswinnerton left a comment

Choose a reason for hiding this comment

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

Hi @vbarrier,

I left some comments that I'd like to hear your thoughts on.

Generally speaking, we're not accepting new features in github-services, which is what this pull request appears to be (adding support for icescrum v7). Since you've already put the work into this, I'd be okay with accepting this pull request. But please know that the preferable way to handle service-based webhooks these days is to use the normal repository / organization webhook flow, and have the icescrum service handle the things done in this pull request. This approach seems similar to what it seems Icescrum does for GitLab. The installation of these hooks for users can even be automated via this API endpoint so that all a user would have to do is click a button in Icescrum, authenticate with GitHub, and it would be configured.

docs/icescrum Outdated
More information on iceScrum : https://www.icescrum.com
More information on Kagilum : https://www.kagilum.com

Don't forget to enable Github app in iceScrum: https://www.icescrum.com/apps/github/
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we might be missing the word "the" here:

Don't forget to enable the Github app in...

docs/icescrum Outdated
1. **project_key** - This is your iceScrum Project key.

2. **authentication** For new iceScrum v7+ only:
2.1 **access_token** - Access token of one team member in the project (such as the ScrumMaster). Where find it?
Copy link
Contributor

Choose a reason for hiding this comment

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

What is meant here by "Where find it?", was this intended to be a link to documentation on where to find this information?

password = data['password'].to_s.gsub(/\s+/, "")
# Cloud only support access token
if data['base_url'].to_s.empty?
raise_config_error "Access token mandatory for cloud" if data['access_token'].to_s.empty?
Copy link
Contributor

Choose a reason for hiding this comment

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

Rather than having a nested trailing conditional, it might be slightly easier to read this if it were:

if data['base_url'].to_s.empty? && data['access_token'].to_s.empty?
  raise_config_error "Access token mandatory for cloud"
end

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you

end

# Support old authentification for R6
if data['access_token'].to_s.empty?
Copy link
Contributor

Choose a reason for hiding this comment

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

Building on my comment from above, since we already have this check here, perhaps we could consolidate them all into something like:

if data['access_token'].to_s.empty?
  raise_config_error "Access token mandatory for cloud" if data['base_url'].to_s.empty?
  raise_config_error "Invalid username" if data['username'].to_s.empty?
  raise_config_error "Invalid password" if data['password'].to_s.empty?
end

I believe this would maintain the current functionality.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you

@stubs.verify_stubbed_calls
end

def test_push_lowcase_project_key
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

@vbarrier vbarrier Aug 12, 2017

Choose a reason for hiding this comment

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

Are you talking about this test: "test_push_valid_custom_url ? It has been deleted already.

@vbarrier
Copy link
Contributor Author

vbarrier commented Aug 12, 2017

H @bswinnerton,

You are right, it's not only a bug fix pull request but it is also intended to maintain our Cloud service. So I thought it was okay to also add our new (and only) access token version.

I'm already working on an app that will use your API for the futur. I have also seen that we can prefill the new personal token form using a GET request.

Thank you :)

@vbarrier
Copy link
Contributor Author

vbarrier commented Sep 29, 2017

Hello @bswinnerton !

Any new about this pull request ready to be merged :) ?

@gjtorikian
Copy link
Contributor

Really sorry for the late reply on this.

Thanks for this PR! Currently this project is slated for deprecation and is only accepting critical bugfixes.

Thank you for your time and understanding, but I will have to close this out. 💞

@gjtorikian gjtorikian closed this Aug 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants