1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-22 23:02:42 +01:00
phorge-phorge/src
Arturas Moskvinas arturas@uber.com 8cc6fe465c Fix diffusion.branchquery returning dictionary instead of array when branches are filtered out
Summary:
`diffusion.branchquery` can return dictionary instead of array if some branches are filtered out.
Eg.:
```
{
  "result": [
    {
      "shortName": "master",
      "commitIdentifier": "2817b0d8f79748ddfad0220c46d9b20bea34f460",
      "refType": "branch",
      "rawFields": {
        "objectname": "2817b0d8f79748ddfad0220c46d9b20bea34f460",
        "objecttype": "commit",
```
might become:
```
{
  "result": {
    "1": {
      "shortName": "master",
      "commitIdentifier": "2817b0d8f79748ddfad0220c46d9b20bea34f460",
      "refType": "branch",
      "rawFields": {
        "objectname": "2817b0d8f79748ddfad0220c46d9b20bea34f460",
        "objecttype": "commit",

```
Reproduction - find repository which has couple of branches, setup to track only some of them, execute `diffusion.branchquery` API call - result is dictionary instead of array

Test Plan: Apply patch, execution `diffusion.branchquery` call - result is no longer dictionary if it was one before

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D20973
2020-02-12 11:50:22 -08:00
..
__tests__ Use PhutilClassMapQuery instead of PhutilSymbolLoader 2015-08-14 07:49:01 +10:00
aphront Move lingering "Aphront" classes to Phabricator 2020-02-12 11:50:14 -08:00
applications Fix diffusion.branchquery returning dictionary instead of array when branches are filtered out 2020-02-12 11:50:22 -08:00
docs Remove "PhabricatorEventType::TYPE_DIFFUSION_LOOKUPUSER" event 2019-11-19 09:38:03 -08:00
extensions
infrastructure Respect linebreaks in full HTML tables in Remarkup 2020-02-06 15:01:16 -08:00
view Use the new "CurtainObjectRefList" UI element for subscribers 2020-02-04 12:38:41 -08:00
__phutil_library_init__.php
__phutil_library_map__.php Move lingering "Aphront" classes to Phabricator 2020-02-12 11:50:14 -08:00