Success

User tests: Successful: Unsuccessful:

avatar zero-24
zero-24
18 Jun 2015

This PR try to implement the RTC Label Check to run also if a comment was add.

What needs to be tested

  • add a pull
  • set status to RTC
  • comment (using jissues)
  • make sure the RTC label will add.
  • add a new pull
  • set the status to RTC
  • comment (using github)
  • make sure the RTC label will add.

I can't realy test it as i have no testserver setup. But in theory it should work or i miss something?

So it is not 100% idial but we have a bit more automagic in the Tracker.

avatar zero-24 zero-24 - open - 18 Jun 2015
avatar mbabker
mbabker - comment - 18 Jun 2015

So on code review I see two issues.

1) The table instance being passed into the comment listener here is an instance of ActivitiesTable while the RTC method needs the IssuesTable (for no other reason than to have the issue's status ID).

2) The webhook data is a bit different between the pull request listener and the comment listener. For example, the pull request event uses $hookData->pull_request->number while in comments to get the pull ID you'd need to use $hookData->issue->number.

Otherwise, at a glance it looks usable.

avatar zero-24
zero-24 - comment - 18 Jun 2015

Thanks @mbabker something like: c3c01b9 ?

avatar zero-24
zero-24 - comment - 18 Jun 2015

should be better now? zero-24@0521bb9

avatar zero-24
zero-24 - comment - 19 Jun 2015

thanks @mbabker now this should be fixed. And it also run on adding a comment. The TriggerEvent is moved inside the try/catch. the ID is now also fixed.

avatar b2z
b2z - comment - 19 Jun 2015

@zero-24 good job here. We can test it on my test server when PR will be ready on 100% ;)

avatar zero-24
zero-24 - comment - 19 Jun 2015

Thanks @b2z see: zero-24@73513de

We can test it on my test server when PR will be ready on 100% ;)

:+1:

avatar b2z
b2z - comment - 30 Jun 2015

BTW I've update my test server, so you can test this PR here
http://jissues.j4devs.ru/tracker/jissues-test

avatar zero-24
zero-24 - comment - 30 Jun 2015

thanks @b2z it works but now i see what i miss. If we set it back to pending the label don't get removed. I will try to code it :smile:

avatar zero-24
zero-24 - comment - 30 Jun 2015

@b2z @mbabker can you get again a look into the code?
It try to implement now:

  • add the RTC label if we change the status to RTC
  • remove the RTC label if we change the status
  • DRY for removing and adding the label
  • base class for the listeners.
avatar b2z
b2z - comment - 1 Jul 2015

Looks good.

Talking about DRY - may we need one more class like JoomlacmsListener which will extend AbstractListener and implement to methods that are common: checkRTCLabel and checkNoCodeLabel ? Then JoomlacmsCommentsListener can extend JoomlacmsListener :)

Or better a trait would be more suitable here?

@mbabker what do you think?

avatar zero-24
zero-24 - comment - 1 Jul 2015

Or better a trait would be more suitable here?

hmm maybe add a method checkLabel to the AbstractListener that check if a specific is set (return true) or not (return false)?

avatar b2z
b2z - comment - 1 Jul 2015

These checks are project specific, so they cannot be in the AbstractListener. IMHO :)

avatar b2z
b2z - comment - 1 Jul 2015

Ah, sorry. I did not read your comment properly. You mean
checkLabel($labelName, $hookData, Github $github, Logger $logger, $project)?

Well this is more abstract :)

avatar zero-24
zero-24 - comment - 1 Jul 2015

Yes. I will try to implement if i get some time today :smile:

avatar zero-24
zero-24 - comment - 1 Jul 2015

ok so now some more DRY and the checkLabel method. Happy for a review. :smile:

avatar b2z
b2z - comment - 2 Jul 2015

Sorry for spam :laughing:

avatar zero-24
zero-24 - comment - 2 Jul 2015

Thanks @b2z i will fix that soon :smile:

avatar zero-24
zero-24 - comment - 2 Jul 2015

@b2z i have fixed that. Can we retest on your server?

avatar b2z
b2z - comment - 3 Jul 2015

Travis is not happy :P

avatar zero-24
zero-24 - comment - 3 Jul 2015

Candy you restart the job? Looks like he fail?

avatar zero-24
zero-24 - comment - 3 Jul 2015

Lol i mean can you (cool auto correction in phone)

avatar b2z
b2z - comment - 3 Jul 2015

I am not sure how to do it (and may be I do not have enough permissions).

avatar b2z
b2z - comment - 3 Jul 2015

Hmm, I think I found it :)

avatar zero-24
zero-24 - comment - 3 Jul 2015

@b2z

go to: https://travis-ci.org/joomla/jissues/builds/69345767
klick the "Sign in with GitHub" button
allow the access
switch again to https://travis-ci.org/joomla/jissues/builds/69345767
on the right site under the "Settings" dropdown there is a restart button :smile:

avatar b2z
b2z - comment - 3 Jul 2015

Yeah I did it, but again it failed... I've restarted it again.

avatar elkuku
elkuku - comment - 4 Jul 2015

From what I can see the build fails because of checkstyle errors so restarting may not solve this... (?)

avatar zero-24
zero-24 - comment - 4 Jul 2015

Thanks @elkuku at the last time Travis fails on other issues. Some bad html code. Now the issues should be fixed thanks :smile:

avatar zero-24
zero-24 - comment - 6 Jul 2015

Thanks @b2z i have just implemented that change ;)

avatar zero-24
zero-24 - comment - 7 Jul 2015

Should be ok now @mbabker @b2z Thanks

avatar b2z
b2z - comment - 8 Jul 2015

The longest PR ever :wink: Now it seems that everything is correct. Code is deployed to my test server. Looks ok for me! @zero-24 huge :+1:

avatar b2z
b2z - comment - 8 Jul 2015

Seems that working good? :)

avatar zero-24
zero-24 - comment - 8 Jul 2015

@b2z yes the RTC Part is ok now ;) The last commit fix also the issue with the "PR-XXX" labels that was not add bevor ;)

for the "No Code Attached" (Should be on all issues that are not pulls ;)) we need to find a solution but i think we can move this outside of this PR as this is a known issue see: #668

avatar b2z
b2z - comment - 8 Jul 2015

Code deployed to test.

avatar zero-24
zero-24 - comment - 8 Jul 2015

Thanks :+1: :100: it works :) Great work @b2z and @mbabker Thanks!

http://jissues.j4devs.ru/tracker/jissues-test/22

If now it is all ok please let me a bit time to write up something for the affected group of People (Commiters, PLT, JBS) to inform about the new RTC "Feature" as this is a change in there workflows ;)

I can give this a bump if this is done (hopefully this week ;)) Thanks again! You are awesome!

avatar brianteeman
brianteeman - comment - 8 Jul 2015

Great work
On 8 Jul 2015 9:54 pm, "zero-24" notifications@github.com wrote:

Thanks [image: :+1:] [image: :100:] it works :) Great work @b2z
https://github.com/b2z and @mbabker https://github.com/mbabker Thanks!

http://jissues.j4devs.ru/tracker/jissues-test/22

If now it is all ok please let me a bit time to write up something for the
affected group of Prople (Commiters, PLT, JBS) to inform about the new RTC
"Feature" as this is a change in there workflows ;)

I can give this a bump if this is done (hopefully this week ;)) Thanks
again! You are awesome!


Reply to this email directly or view it on GitHub
#667 (comment).

avatar b2z
b2z - comment - 9 Jul 2015

Well I do not have any comments on the code :smile: If @mbabker is ok with it then we can merge :wink:

avatar zero-24
zero-24 - comment - 10 Jul 2015

@mbabker As you can seen the info is shared (I hope i don't miss anyone) so this is ready to go if you are ok with it :+1:

The missing on are only the bots but I think they follow the code :smile:

avatar brianteeman
brianteeman - comment - 10 Jul 2015

On 10 Jul 2015 7:50 am, "zero-24" notifications@github.com wrote:

@mbabker As you can seen the info is shared (I hope i don't miss anyone)
so this is ready to go if you are ok with it

You did but I am getting used to it

The missing on are only the bots but I think they follow the code


Reply to this email directly or view it on GitHub.

avatar mbabker
mbabker - comment - 10 Jul 2015

I'll be looking it over today.

On Fri, Jul 10, 2015 at 2:50 AM, zero-24 notifications@github.com wrote:

@mbabker https://github.com/mbabker As you can seen the info is shared
(I hope i don't miss anyone) so this is ready to go if you are ok with it [image:
:+1:]

The missing on are only the bots but I think they follow the code [image:
:smile:]


Reply to this email directly or view it on GitHub
#667 (comment).

avatar zero-24 zero-24 - change - 16 Jul 2015
Title
Let the RTC Label Check also run o a comment
Let the RTC Label Check also run on a comment
avatar b2z
b2z - comment - 17 Jul 2015

@mbabker let's merge it :wink:

avatar mbabker mbabker - change - 20 Jul 2015
Status New Closed
Closed_Date 0000-00-00 00:00:00 2015-07-20 14:40:11
Closed_By mbabker
avatar mbabker mbabker - close - 20 Jul 2015
avatar mbabker mbabker - reference | 91da793 - 20 Jul 15
avatar mbabker mbabker - merge - 20 Jul 2015
avatar mbabker mbabker - close - 20 Jul 2015
avatar zero-24 zero-24 - head_ref_deleted - 26 Jul 2015

Add a Comment

Login with GitHub to post a comment