Jump to content

User talk:Rammanojpotla/Flow

About this board

Pavithraes (talkcontribs)
The Surreal Barnstar
Thank you for mentoring an Outreachy project this summer! You're awesome! ^>^ Pavithraes (talk) 19:32, 15 September 2020 (UTC)
Reply to "A barnstar for you!"

re: API to find commits

7
MModell (WMF) (talkcontribs)

You asked me a question via IRC but now you aren't online, so I'm responding here:


Maybe this is what you need? https://phabricator.wikimedia.org/conduit/method/diffusion.commit.search/

It would also be valid to only query gerrit since phabricator is mostly just a mirror of gerrit repositories, there are very few repositories on phabricator which aren't also on gerrit.

Rammanojpotla (talkcontribs)

Thanks for the reply MModell. I have seen it just now. I regret for being offline, I won't repeat it again. I will try out the API and get back to you.

Rammanojpotla (talkcontribs)

Thanks again for the quick response, I just checked the API. It is not exactly what I need. I only need the count of the all the tasks a user subscribed to. I am basically querying for "user activity" rather than "user contributions". Of course most of the repo's present in phabricator are mirror of the gerrit ones. But there can be a case where a user subscribes for a task(on phabricator) that is owned and assigned to some other users. I want to get count of all those tasks (including the ones which he owned, solved) in form of "user activity". If I only query gerrit, there is a chance that I could not get all the above information. So can you please let met know if there is any API available to get the count of user contributions like here ?


Thanks!

MModell (WMF) (talkcontribs)

I think the maniphest.search api can do most of what you need for task related activity.

To find all the tasks that a given user has subscribed to, including their own assigned and resolved tasks, just use the subscribers constraint, like this:

{
  "constraints": {
    "subscribers": [ "mmodell" ]
  }
}


Rammanojpotla (talkcontribs)

Okay Thanks, So is it possible to get the union of "authors" and "assigner" using that API ? I tried this out

{

"constraints": {

"authorPHIDs": [ "PHID-USER-utkozuokiv4qi3otfgny"],

"assigned": ["PHID-USER-utkozuokiv4qi3otfgny"]

}

}


For the above result, I am getting an output that is intersection of the results that I got with only "authorPHIDs" and only "assigned". Is there way to perform the union of above two results ?

Thanks!

Rammanojpotla (talkcontribs)

The response to maniphest.search is paginated. Is there any way possible to get the of subsequent pages without getting the previous ones. i.e suppose I am making a request to page 1, I receive a "cursor" parameter, which has a "after" and "before" values to represent the next and previous pages. So, to get the details of page 10 I need to request till 9 pages and find the "after" value for the 10th page. Is there any other alternate way to get the 10th page directly? by putting something like (?page=10 i.e as most apis follow it).

MModell (WMF) (talkcontribs)

Unfortunately I think the answer is no and no.

  1. I don't think you can get the union of those two sets directly. You'd need to get the two sets and do the union on the client.
  2. I don't think there is a way to jump to page 10 without fetching the previous pages.
Reply to "re: API to find commits"

View history goes to dropdown even if user logged out

3
Rammanojpotla (talkcontribs)

what could be the reason behind nature of "view history" tab  which collapses to dropdown in when screen resolution is less and when user is logged out in Vector skin as on getting logged out the array data["action_urls"] could be a empty portlet but on screens with lesser resolution more option would be generated and "view history" goes inside it , how it could be possible t

And after logged in I unset the array data["action_urls"] then when the screen resolution become lesser "view history" is not getting collapsed under more (as it shows empty portlet same that of not logged in) what is the reason of this behavior of producing the more option and goes inside when user logged out but not logged in?

AKlapper (WMF) (talkcontribs)

I'm afraid nobody will see this if you post a question to yourself on your own discussion page. :) You may want to try Project:Support desk if this is still an issue.

Rammanojpotla (talkcontribs)

Sorry for it @Aklapper, I was a newbie to Mediawiki, when I created this page (i.e almost 2 years ago). I didn't know where to reach out for help that time. So, I accidentally posted it here and forgot about that, I don't even remember a page alike this exists (till you put the message). Sorry for that and will not repeat this again in future.

Reply to "View history goes to dropdown even if user logged out"

Some baklava for you!

1
Gopavasanth (talkcontribs)
Reply to "Some baklava for you!"
There are no older topics