avatar weeblr
weeblr
28 Feb 2021

This was reported to me by users wanting to test a PR I made against staging. I confirmed it today.

Steps to reproduce the issue

Follow the steps to install patch tester, then press Fetch Data to obtain available PRs from Github.

Expected result

A list of all PR.

Actual result

A small number of PRs are shown. For Joomla 3 ("staging"), I see 8 PRs. For 4 and 4.1, there's about 15 of them only.

(My PR is not in the list, that's how users reported it to me)

System information (as much as possible)

N/A

Additional comments

  1. I tested initially without being logged in to Github. I then fetched data again after adding a Personal token. The fetch succeeded in both cases, returning the exact same list of PRs.

  2. Same thing happens with PatchTester 4 running on Joomla 4. Exact same PRs are pulled.

Something I'm missing?

avatar weeblr weeblr - open - 28 Feb 2021
avatar richard67
richard67 - comment - 28 Feb 2021

I can confirm this issue, but I have no idea what could be the cause.

avatar weeblr
weeblr - comment - 1 Mar 2021

Hi

I believe this is because it's using an older Github API that fetches Issues and then extract PR from the list of issues. It has a batch size of 100 issues, so the 100 more recent issues are read, and then only maybe 20 or 30 of those issues have PR and are displayed.

Github let's you now read directly the PR and I only had to change a few lines to make the tester work again - in my limiting testing.

I'll do a PR.

avatar weeblr
weeblr - comment - 1 Mar 2021

@roland-d @richard67

In trying to fix this, I saw that the PullsModel that fetches the list of Pulls uses the issues github API endpoint (which leads to the problem at hand), while the PullModel, that reads the detail of a single PR uses the pulls endpoint.

From whar I know, both should be using the pulls endpoint. Is there a specific reason for using issues instead of pulls when reading the full list? rate limiting? performance?

avatar richard67
richard67 - comment - 1 Mar 2021

I don't know. Maybe historic reasons.

avatar weeblr
weeblr - comment - 1 Mar 2021

@richard67 I have made two PRs, one for J3 and one for J4.

I have tested the J3 version fully, not the version 4.

avatar roland-d
roland-d - comment - 1 Mar 2021

Hello @weeblr I would think this is because it is historic as @richard67 said. This code hasn't been touched for a long time. I will have a look at the PRs in the next few days.

Thank you for the PRs.

avatar weeblr
weeblr - comment - 2 Mar 2021

Hi

That'd be cool, it was pretty disconcerting for these users trying out to help for the 1st time at my demand and not being able to find the PR I was asking them to test.

If possible, can you post back here if/when you make a new release, I'd like to mention it on the French FB group when solved.

avatar roland-d
roland-d - comment - 2 Mar 2021

Hello, once I have done the fixes and release is ready I will ping you.

avatar roland-d
roland-d - comment - 4 Mar 2021

@weeblr The PatchTester 4.0.1 has now been released. Version 3 is coming.

avatar roland-d roland-d - close - 4 Mar 2021
avatar roland-d
roland-d - comment - 4 Mar 2021

@weeblr The Joomla 3 version is out now as well. Thank you for your work on this.

avatar roland-d roland-d - change - 4 Mar 2021
Status New Closed
Closed_Date 0000-00-00 00:00:00 2021-03-04 19:40:23
Closed_By roland-d
avatar weeblr
weeblr - comment - 5 Mar 2021

Hi @roland-d

Thanks for the quick turnaround will check them and inform users.

Cheers

Add a Comment

Login with GitHub to post a comment