UserScripts icon indicating copy to clipboard operation
UserScripts copied to clipboard

Github Issues

Open LaptopDev opened this issue 5 months ago • 7 comments

Title Github Issues


Description

The url of site https://github.com/hoothin/UserScripts/issues https://github.com/hoothin/UserScripts/issues?q=is%3Aopen+is%3Aissue https://github.com/hoothin/UserScripts/issues/

Is your request related to a problem? Please describe. Yes — I'm trying to create a rule that matches GitHub Issue listing pages across any repository. The rule should work whether the URL includes a query string, a trailing slash, or neither. My attempts result in either a JSON error or a rule that doesn't match valid URLs.

Describe the result you'd like with the rule I want the rule to match all issue listing pages under any GitHub repository, such as:

  • /owner/repo/issues
  • /owner/repo/issues/
  • /owner/repo/issues?some=query

...but not subpaths like /issues/new or /issues/123.

Custom rule you've tried

"^https:\\/\\/github\\.com\\/[^\\/]+\\/[^\\/]+\\/issues(?:\\/|\\?.*|$)"

But Pagetual throws a JSON error or fails to match all the cases above.

Additional context This rule is intended to generalize across repositories. I suspect the error may be due to improper escaping expectations or the way Pagetual parses input. If there's a specific expected format (e.g. raw regex, stringified JSON, etc.), please clarify. Screenshots available if needed.

LaptopDev avatar Jul 09 '25 13:07 LaptopDev

You can use in other repositories' Issues sections, but not in this one.

hoothin avatar Jul 09 '25 23:07 hoothin

I don't seem to be able to use it in other repositories' Issues sections. can you provide me the rule you are using?

LaptopDev avatar Jul 11 '25 21:07 LaptopDev

https://pagetual.hoothin.com/rules/nextLinkByUrl.html

{
    "name": "Github issues and pulls",
    "url": "^https:\\/\\/github\\.com\\/[^/]+\\/[^/]+\\/(?:issues|pulls)",
    "pageElement": "ul[role='list']",
    "nextLinkByUrl": [
        "(&page=(\\d+))?$",
        "&page={$2+1}"
    ],
    "pinUrl": true,
    "action": 0
}

hoothin avatar Jul 12 '25 00:07 hoothin

That rule is not completely working for me, though it indicates it is loading: "Shojo Now Loading", but without ever loading anything.

This is a page I have tried it on: https://github.com/gdm-settings/gdm-settings/issues?q=sort%3Aupdated-desc+is%3Aissue+is%3Aopen

LaptopDev avatar Jul 12 '25 00:07 LaptopDev

The example you provided only has 23 issues in total, so no page numbers were generated. Please refer to the rules I've given and use the third stop marker.

hoothin avatar Jul 12 '25 00:07 hoothin

I added that rule to pagetual's main rules and it's still not working for me, even on https://github.com/microsoft/vscode/issues

LaptopDev avatar Jul 12 '25 01:07 LaptopDev

Image This is just a sample to get you started. You'll need to create your own rules, like setting up different rules based on whether or not the URL contains 'page'.

hoothin avatar Jul 12 '25 01:07 hoothin