Github integration in standard window: fetch arbitrary Pull Request

2 views
Skip to first unread message

Luiz Americo Pereira Camara

unread,
May 11, 2023, 3:03:44 AM5/11/23
to smar...@googlegroups.com
I have a license of SmartGit 22.1.5

I really like the standard window

But i could not get to fetch a Pull Request from an upstream repository.

I have cloned my fork of a github project: https://github.com/blikblum/restructure (configured as origin remote)

The upstream remote is configured to https://github.com/foliojs/restructure

I tried to fetch this pull request: https://github.com/foliojs/restructure/pull/59

But it does not show in My History

I even tried to set me a reviewer, but still did not worked

I switched to Log Window, clicked on Github button and this PR was listed so i could fetch

Having a way to fetch arbitrary Pull Requests is something i want to see in Standard Window

Luiz

syntevo Support

unread,
May 11, 2023, 4:02:16 AM5/11/23
to smar...@googlegroups.com
> I have cloned my fork of a github project:
> https://github.com/blikblum/restructure (configured as origin remote)
>
> The upstream remote is configured to https://github.com/foliojs/restructure
>
> I tried to fetch this pull request:
> https://github.com/foliojs/restructure/pull/59
>
> But it does not show in My History

In general, this is expected ...

> I even tried to set me a reviewer, but still did not worked

... but that sounds unexpected. Hence, please check SmartGit's logs/log.txt.0 for the API call(s) containing:

Sending POST 'https://api.github.com/graphql': query: search

What's the exact "query" here?

> Having a way to fetch arbitrary Pull Requests is something i want to see in
> Standard Window

The current approach of the Log window of loading all pull requests for a project is somewhat inefficient and usually gives too much unrelated stuff for most users. Hence, for the Standard window, we have restricted the query to pull requests which are affecting you in some way. CODEOWNERS might be a good way to declare yourself as default reviewer:

https://stackoverflow.com/a/46346494

--
Best regards,
Marc Strapetz
syntevo GmbH
http://www.syntevo.com
> --
> You received this message because you are subscribed to the Google Groups
> "SmartGit" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> smartgit+u...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/smartgit/CA%2BnZ%3DyMJjTFcdwUNLQB3yNNwbCcZNpsqL5Ez0n6sju7ZpYDv6w%40mail.gmail.com.
>

Luiz Americo Pereira Camara

unread,
May 11, 2023, 10:22:44 AM5/11/23
to smar...@googlegroups.com
Em qui., 11 de mai. de 2023 às 05:02, syntevo Support <smar...@syntevo.com> escreveu:
> I have cloned my fork of a github project:
> https://github.com/blikblum/restructure (configured as origin remote)
>
> The upstream remote is configured to https://github.com/foliojs/restructure
>
> I tried to fetch this pull request:
> https://github.com/foliojs/restructure/pull/59
>
> But it does not show in My History

In general, this is expected ...

> I even tried to set me a reviewer, but still did not worked

... but that sounds unexpected. Hence, please check SmartGit's logs/log.txt.0 for the API call(s) containing:

Sending POST 'https://api.github.com/graphql': query: search


 Sending POST 'https://api.github.com/graphql': query: search (query: "is:pr is:open repo:blikblum/restructure involves:blikblum", type: ISSUE, first: 100)

The PR is in the upstream repository: https://github.com/foliojs/restructure not in my fork

BTW: this the recommended approach when collaborating with third party projects in github: create a fork, push to your fork and create a PR in the upstream repository.

Even if the PR was created by me, it would not show because is looking to my repository and not to the upstream
 
What's the exact "query" here?

> Having a way to fetch arbitrary Pull Requests is something i want to see in
> Standard Window

The current approach of the Log window of loading all pull requests for a project is somewhat inefficient and usually gives too much unrelated stuff for most users. Hence, for the Standard window, we have restricted the query to pull requests which are affecting you in some way. CODEOWNERS might be a good way to declare yourself as default reviewer:

https://stackoverflow.com/a/46346494



I understand the reasoning. I'm not requesting to be the default behavior,  i am requesting is a escape hatch to fetch arbitrary PR (i can be somewhat hidden in context menu or as a small button like Log window). It not need to be in My history. can be in All branches

I collaborate to many open source projects, and  in most of them i am not a maintainer so i cannot set myself as a reviewer.

Many times, i am interested in checking third party PRs to test and give my opinion

Luiz

syntevo Support

unread,
May 11, 2023, 1:38:12 PM5/11/23
to smar...@googlegroups.com
> The PR is in the upstream repository: https://github.com/foliojs/restructure
> not in my fork
>
> BTW: this the recommended approach when collaborating with third party
> projects in github: create a fork, push to your fork and create a PR in the
> upstream repository.
>
> Even if the PR was created by me, it would not show because is looking to
> my repository and not to the upstream

Please give 23.1 build 20075 a try: Help|Check for Latest Build. It will now query:

is:pr is:open repo:blikblum/restructure repo:foliojs/restructure involves:blikblum

and thus give you pull request #51. Note that it will still filter out all pull requests which do not either target blikblum/restructure or originate from blikblum/restructure, i.e. you will not see all pull requests from repo:foliojs/restructure which are assigned to you (or which you have authored). There would be no appropriate branch anchor in blikblum/restructure for such pull requests.

The Log window behaves different: it will send a separate query for every remote. Hence, if you have remotes "origin" (blikblum/restructure) and "upstream" (repo:foliojs/restructure), you will see all pull requests.

> I understand the reasoning. I'm not requesting to be the default behavior,
> i am requesting is a escape hatch to fetch arbitrary PR (i can be somewhat
> hidden in context menu or as a small button like Log window). It not need
> to be in My history. can be in All branches
>
> I collaborate to many open source projects, and in most of them i am not a
> maintainer so i cannot set myself as a reviewer.
>
> Many times, i am interested in checking third party PRs to test and give my
> opinion

Please request this at UserEcho:

https://smartgit.userecho.com/

--
Best regards,
Marc Strapetz
syntevo GmbH
http://www.syntevo.com



> --
> You received this message because you are subscribed to the Google Groups
> "SmartGit" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> smartgit+u...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/smartgit/CA%2BnZ%3DyNv2pOfdF7ERF%2BLytvwjSTfmRKy4aPyhPnhtU_w6nvKww%40mail.gmail.com.
>

Luiz Americo Pereira Camara

unread,
May 15, 2023, 2:16:47 AM5/15/23
to smar...@googlegroups.com
Em qui., 11 de mai. de 2023 às 14:38, syntevo Support <smar...@syntevo.com> escreveu:
> The PR is in the upstream repository: https://github.com/foliojs/restructure
> not in my fork
>
> BTW: this the recommended approach when collaborating with third party
> projects in github: create a fork, push to your fork and create a PR in the
> upstream repository.
>
> Even if the PR was created by me, it would not show because is looking to
> my repository and not to the upstream

Please give 23.1 build 20075 a try: Help|Check for Latest Build. It will now query:

I clicked in Help|Check for Latest Build but only got version 22.1.5 #19271, installed: #19255

Luiz

syntevo Support

unread,
May 15, 2023, 3:48:12 AM5/15/23
to smar...@googlegroups.com
> I clicked in Help|Check for Latest Build but only got version 22.1.5
> #19271, installed: #19255

Please get 23.1 Preview first:

https://www.syntevo.com/smartgit/preview/

--
Best regards,
Marc Strapetz
syntevo GmbH
http://www.syntevo.com



> --
> You received this message because you are subscribed to the Google Groups
> "SmartGit" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> smartgit+u...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/smartgit/CA%2BnZ%3DyNgK%2BCw9FcRadcrjUMQ7MbNJfx0y6HGFQAyj6g7HGb9ZQ%40mail.gmail.com.
>
Reply all
Reply to author
Forward
0 new messages