product-definition-center / pdc-ruby-gem

PDC Ruby Gem
MIT License
1 stars 7 forks source link

Add new resource Global Component Contact #35

Closed jacobseth closed 6 years ago

jacobseth commented 6 years ago

This patch adds the global-component-contact resource, along with tests.

coveralls commented 6 years ago

Coverage Status

Changes Unknown when pulling 593f0230d2f8f739156cfdd3f3eefdcf3e38aa8d on jacobseth:add_global_component_contacts into on product-definition-center:master.

coveralls commented 6 years ago

Coverage Status

Changes Unknown when pulling b476732b2957155d7ddf93279dc28df1a6649e46 on jacobseth:add_global_component_contacts into on product-definition-center:master.

ycheng-aa commented 6 years ago

It has a little possibility be caused by token problem. pronto will post comments just looks like they are posted by the token's owner. If the token is ineffective or wrong, this kind of failure will occur. Maybe some other reasons I don't know. Just provide a little information.

I think the token might be configured as an environment variable in secret form in .travis.yml.

ycheng-aa commented 6 years ago

oh, I saw https://github.com/product-definition-center/pdc-ruby-gem/commit/9f277af34384297648eec83b0f1fd9900ecc2bcd . Looks .travis.yml is already removed the token part. Sorry for the misleading. I am not sure if pronto could work without an effective token. But looks it worked well previously?

simozhan commented 6 years ago

@ycheng-aa np, thanks for your active response :)

ycheng-aa commented 6 years ago

@simozhan Is it possible that pronto can't work at all, but previous commits didn't have any code violation but this time had then pronto tried to post comment and error occurred? Just a wild guess.

simozhan commented 6 years ago

@xiangge Good catch! I used rubocop locally to have a test. There is error "examples/pdc_global_component_contact.rb:18:9: C: Style/YodaCondition: Reverse the order of the operands FILE == $PROGRAM_NAME. (https://en.wikipedia.org/wiki/Yoda_conditions)". After fixing this, this issue disappears. We have some of robocop errors, I guess some time before the TOKEN doesn't work which maybe involves these errors, but robocop runs only check the commit diff's error, so these existing errors will not be found in the next commit. Let's fix that in another patch

simozhan commented 6 years ago

@jacobseth can you fix the robocop error and resubmit? Thanks!

romanofski commented 6 years ago

Yeah I think making the tests happy is a good thing, everything else seems fine to me.

jacobseth commented 6 years ago

Sorry for taking so long to reply. I was unsure whether this patch was still needed, so I went away to do some other work. I just pushed your recommended changes, thank-you for the reviews.

I also pushed the yoda conditions as a separate commit but for some reason it has squished them once it got to github. Please let me know if I should change this.

coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.04%) to 98.874% when pulling 898d10e57bba3624e46cff040c4a8d4621862ca6 on jacobseth:add_global_component_contacts into 6b05fd61804b2220c4cb754cb38424480cc2436c on product-definition-center:master.

coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.04%) to 98.874% when pulling 79293c60732a1ef2decefdd62931cf90f92fd99c on jacobseth:add_global_component_contacts into 6b05fd61804b2220c4cb754cb38424480cc2436c on product-definition-center:master.

jacobseth commented 6 years ago

I have added the changes you recommended @simozhan.

coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.04%) to 98.874% when pulling ebaa1809d52ebe0f2f3e8bb165b393aa12db48f6 on jacobseth:add_global_component_contacts into 6b05fd61804b2220c4cb754cb38424480cc2436c on product-definition-center:master.

coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.04%) to 98.874% when pulling 070bc086cbc55f3f4d7eeaa0cda1fea0ef7ae633 on jacobseth:add_global_component_contacts into 6b05fd61804b2220c4cb754cb38424480cc2436c on product-definition-center:master.