GitHub sync enhancement Success

User tests: Successful: Unsuccessful:

avatar elkuku
elkuku
7 Oct 2014

This will add initial support for a status comment on GitHub than might hold information from issues.joomla.org not present on GitHub.

Currently only user test results are displayed, since this seems to be high priority.

Since this is a new feature, status comments for existing issues will be created at the end of the comment list and only if the PR gets updated.

Example: jtester/tests#44 (comment)

Ref #510, #511
Fix #519

avatar elkuku elkuku - open - 7 Oct 2014
avatar elkuku
elkuku - comment - 7 Oct 2014

There is currently a strange bug in PHPStorm causing new branches being pushed to the wrong repo. Apologies...

avatar b2z
b2z - comment - 10 Oct 2014

:+1: Will test on weekend!

avatar elkuku
elkuku - comment - 10 Oct 2014

@b2z Please note when testing that this will create/update a status comment on GitHub when updating issue using the CLI script, so you might want to use a "test project" for testing :wink: feel free to spam at https://github.com/jtester/tests :tongue:

BTW: I would find it interesting if we could add this repo as a project to i.j.o for testing purpose.. @mbabker ?

avatar mbabker
mbabker - comment - 10 Oct 2014

I don't mind it

avatar b2z
b2z - comment - 11 Oct 2014

ok seems that I need a credentials for edit bot...

Adding issues to the database...
[                           ]   5/529 00:00.00 ETA: 00:00.46

ERROR: Bad credentials

Call stack:
#0 JPATH_ROOT/src/JTracker/Github/Package/Issues/Comments.php(182): JTracker\GitHub\GithubObject->processResponse(Object(Joomla\Http\Response), 201)
#1 JPATH_ROOT/src/App/Tracker/Model/IssueModel.php(671): JTracker\Github\Package\Issues\Comments->create('joomla', 'jissues', 5, '<!-- JTRACKER S...')
#2 JPATH_ROOT/cli/Application/Command/Get/Project/Issues.php(663): App\Tracker\Model\IssueModel->updateGitHubStatusComment(5, '0', 'http://issues.j...')
#3 JPATH_ROOT/cli/Application/Command/Get/Project/Issues.php(357): Application\Command\Get\Project\Issues->updateGitHubStatusComment(Object(stdClass), '0')
#4 JPATH_ROOT/cli/Application/Command/Get/Project/Issues.php(88): Application\Command\Get\Project\Issues->processData()
#5 JPATH_ROOT/cli/Application/Command/Get/Project.php(211): Application\Command\Get\Project\Issues->execute()
#6 JPATH_ROOT/cli/Application/Command/Get/Project.php(132): Application\Command\Get\Project->processIssues()
#7 JPATH_ROOT/cli/Application/Application.php(249): Application\Command\Get\Project->execute()
#8 JPATH_ROOT/vendor/joomla/application/src/AbstractApplication.php(105): Application\Application->doExecute()
#9 JPATH_ROOT/cli/tracker.php(40): Joomla\Application\AbstractApplication->execute()
avatar elkuku
elkuku - comment - 11 Oct 2014

I have just added a test project to i.j.o ⇒ http://issues.joomla.org/tracker/jtests
Since you have been added as a collaborator, you should be able to use the @b2z credentials for the bot account. This is a little weird but should work for testing ;)

If you'd like another GitHub account, just give me a user name.

avatar b2z
b2z - comment - 11 Oct 2014

Oops, sry! Have spammed jissues project a little bit... ^_^ So during the spam I noticed two things.

  • Error in CLI
Notice: Undefined property: stdClass::$gh_status_comment_id in /vagrant/src/JTracker/Database/AbstractDatabaseTable.php on line 120

Call Stack:
    0.0006     230056   1. {main}() /vagrant/cli/tracker.php:0
    0.1437    1915760   2. Joomla\Application\AbstractApplication->execute() /vagrant/cli/tracker.php:40
    0.1437    1915792   3. Application\Application->doExecute() /vagrant/vendor/joomla/application/src/AbstractApplication.php:105
    0.1599    2105560   4. Application\Command\Get\Project->execute() /vagrant/cli/Application/Application.php:249
   19.1122    3840064   5. Application\Command\Get\Project->processIssues() /vagrant/cli/Application/Command/Get/Project.php:132
   19.1173    3979480   6. Application\Command\Get\Project\Issues->execute() /vagrant/cli/Application/Command/Get/Project.php:211
   31.7728   10067488   7. Application\Command\Get\Project\Issues->processData()/vagrant/cli/Application/Command/Get/Project/Issues.php:88
   75.8413   11613680   8. JTracker\Database\AbstractDatabaseTable->__set() /vagrant/cli/Application/Command/Get/Project/Issues.php:357

The same error is for line 144.

  • I do not think that we should add this to simple Issues, but only for PRs. Currently during import this comment was created for issues also.
avatar elkuku
elkuku - comment - 11 Oct 2014

I do not think that we should add this to simple Issues

There might be things (like categories) that we also want to share with GitHub?

Notice: Undefined property: stdClass::$gh_status_comment_id

Did you update the database?

Oops, sry! Have spammed jissues project a little bit... ^_^

So much for #520 (comment) :tongue:

avatar b2z
b2z - comment - 11 Oct 2014

There might be things (like categories) that we also want to share with GitHub?

AFAIK categories should be displayed as labels.

Did you update the database?

My fault. I did, but after that I re-installed and forgot :(

Can you provide a small instruction how to test it?

BTW this comment is also synced with the Tracker. Is it ok?

avatar b2z
b2z - comment - 12 Oct 2014

And one more question :tongue: If I will reinstall my dev env and will try to import then it means that all projects will be "spammed"?

avatar elkuku elkuku - change - 13 Oct 2014
Labels Added: enhancement GitHub sync
avatar roland-d
roland-d - comment - 20 Nov 2014

@elkuku

Currently only user test results are displayed, since this seems to be high priority.

That would be helpful.

Example: jtester/tests#44 (comment)

I am not understanding how to read this. Is this repo#entry (users comment) correct?

avatar b2z
b2z - comment - 20 Nov 2014

@roland-d may be the source code give you an idea how to read this? :)

If we would not use icons:
Level: IssueLevel Tests: successful Number (usernames who tested) failed Number (usernames who tested)

avatar roland-d
roland-d - comment - 23 Nov 2014

@b2z I like the textual one, that may be clear to everybody. Icons do not always transcend cultures :)

avatar elkuku
elkuku - comment - 24 Nov 2014

I'd agree with @roland-d here... There might be a culture where :beer: is not a synonym for Easy :tongue:
On the other hand those icons would keep the screen a bit clearer..

What if we provide some sort of legend on issues.j.org and a ? (link to it) in every comment? would that help?

avatar roland-d
roland-d - comment - 24 Nov 2014

@elkuku Are we assuming people are going to read it :open_mouth:

avatar elkuku
elkuku - comment - 24 Nov 2014

Are we assuming people are going to read it

This is one of the questions when writing new documentation... Let's assume that people are "good" :wink:

avatar roland-d
roland-d - comment - 24 Nov 2014

Fine by me :)

avatar b2z
b2z - comment - 12 Dec 2014

@elkuku can you clarify - status comment always will be in one place? Now it is lost when there are many comments. See this for example.

avatar elkuku
elkuku - comment - 12 Dec 2014

status comment always will be in one place?

Sure that's the idea.
The status comment should be on top as the first comment. Unfortunately for already existing (and commented) issues there is no way (i'm aware of) to change the submission dates afterwards.

BTW: I'm currently exploring a new feature recently added to the GitHub UI that might be more "generic": https://github.com/blog/1935-see-results-from-all-pull-request-status-checks

avatar b2z
b2z - comment - 12 Dec 2014

BTW: I'm currently exploring a new feature recently added to the GitHub UI that might be more "generic":

Looks nice. BTW how do I test your PR locally? As I stated above there will be a flood during import :(

avatar elkuku
elkuku - comment - 12 Dec 2014

BTW how do I test your PR locally? As I stated above there will be a flood during import :(

Yeah that' a current limitation... theoretically the system should be able to "identify" the status comment by a HTML comment (<!-- ... -->) contained in it.
The code has just not been written yet :wink:

avatar b2z
b2z - comment - 16 Dec 2014

@elkuku are you planning more changes or it's the final and can be tested?

avatar elkuku elkuku - change - 17 Dec 2014
Status New Closed
Closed_Date 0000-00-00 00:00:00 2014-12-17 03:21:04
avatar elkuku elkuku - close - 17 Dec 2014
avatar elkuku
elkuku - comment - 17 Dec 2014

are you planning more changes or it's the final and can be tested?

Well yes and no...
As I stated above there is now a new possibility in GitHub to show several statuses for a pull request.

I think we should explore this and try to tie in our application in a way that the "human test results" reported from our application show up next to the Travis (or other) results in the GitHub UI next to the merge button.

I also like the way the CI results are tied to a specific commit. We should do the same for the human tests.

I mean: A "normal PR" would contain one or more commits. Now Travis would take the code from the last commit and run its tests against it.
I think we should do the same for the human tests. Like: *Tested commit SHA"
This should show up somehow in our application UI but Joe User must not really know about those details - I guess..

So if a PR gets new commits, those "old" test results would be automatically "reset" and all the testers would be required to test again (maybe we could set up some e-mail notification like "The PR you tested has changed - please test again" -.or something..

Those are currently just some wild ideas and code has to be written as well as the JBS has to agree (and adopt) the work flow. Any input here would be greatly apreciated :wink:

That said I think we should not go with this "status comment thing" here, which honestly was more an ugly hack than a smart solution, so I am closing this here.

Sorry for the mess and sorry also to @dgt41 (big THANKS for your contribution).

avatar elkuku elkuku - close - 17 Dec 2014
avatar b2z
b2z - comment - 18 Dec 2014

Anyway thank you for the work you did :+1:

Add a Comment

Login with GitHub to post a comment