1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-02 11:42:42 +01:00
phorge-phorge/src/applications/diffusion/conduit
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
..
DiffusionBlameConduitAPIMethod.php Implement a dedicated "diffusion.blame" API method 2016-01-06 09:24:03 -08:00
DiffusionBranchQueryConduitAPIMethod.php Fix diffusion.branchquery returning dictionary instead of array when branches are filtered out 2020-02-12 11:50:22 -08:00
DiffusionBrowseQueryConduitAPIMethod.php Clean up a few "%Q" stragglers in SVN repository browsing code 2019-03-05 11:30:55 -08:00
DiffusionCommitEditConduitAPIMethod.php Add "diffusion.commit.edit", a v3 edit API endpoint for commits 2017-01-11 10:38:14 -08:00
DiffusionCommitParentsQueryConduitAPIMethod.php Give Conduit params/return/errors protected visibility 2015-04-13 11:58:35 -07:00
DiffusionCommitSearchConduitAPIMethod.php Add diffusion.commit.search Conduit API method 2017-01-12 13:23:29 -08:00
DiffusionConduitAPIMethod.php Fix some missing renames of Application classes 2014-07-24 18:03:59 -07:00
DiffusionDiffQueryConduitAPIMethod.php Fix errors found by PHPStan 2017-02-17 10:10:15 +00:00
DiffusionExistsQueryConduitAPIMethod.php Filter and reject "--config" and "--debugger" flags to Mercurial in any position 2017-11-10 08:42:07 -08:00
DiffusionFileContentQueryConduitAPIMethod.php Make logic for streaming VCS stuff directly to Files more reusable 2016-08-27 09:10:20 -07:00
DiffusionFindSymbolsConduitAPIMethod.php Add repository parameter to diffusion.findsymbols method 2015-05-05 08:27:08 +10:00
DiffusionGetLintMessagesConduitAPIMethod.php Change "lint save" to not use Arcanist Projects 2015-05-19 00:07:47 +10:00
DiffusionGetRecentCommitsByPathConduitAPIMethod.php Deprecate Conduit method "diffusion.getrecentcommitsbypath" 2018-08-03 09:48:58 -07:00
DiffusionHistoryQueryConduitAPIMethod.php Clean up a few "%Q" stragglers in SVN repository browsing code 2019-03-05 11:30:55 -08:00
DiffusionInternalAncestorsConduitAPIMethod.php Support an "Ancestors Of: ..." constraint in commit queries 2018-05-08 15:51:42 -07:00
DiffusionInternalGitRawDiffQueryConduitAPIMethod.php In Git, only use "--find-copies-harder" on small diffs 2016-07-10 08:03:57 -07:00
DiffusionLastModifiedQueryConduitAPIMethod.php Bail out of PhabricatorRepositoryGraphCache more aggressively after cache fills 2017-10-06 14:12:58 -07:00
DiffusionLookSoonConduitAPIMethod.php Convert diffusion.looksoon to use repository identifiers instead of callsigns 2016-01-04 06:54:20 -08:00
DiffusionMergedCommitsQueryConduitAPIMethod.php Filter and reject "--config" and "--debugger" flags to Mercurial in any position 2017-11-10 08:42:07 -08:00
DiffusionQueryCommitsConduitAPIMethod.php Add diffusion.commit.search Conduit API method 2017-01-12 13:23:29 -08:00
DiffusionQueryConduitAPIMethod.php Remove "unstable" status and T2784-specific warning message 2019-07-15 14:05:26 -07:00
DiffusionQueryPathsConduitAPIMethod.php Fix another Git 2.16.0 CLI compatibility issue 2018-02-07 17:54:39 -08:00
DiffusionRawDiffQueryConduitAPIMethod.php Return Diffusion diffs through Files, not directly over Conduit 2016-08-27 09:11:03 -07:00
DiffusionRefsQueryConduitAPIMethod.php phtize all the things 2015-05-22 21:16:39 +10:00
DiffusionRepositoryEditConduitAPIMethod.php Trivially implement RepositoryEditEngine and API methods 2016-04-17 16:02:13 -07:00
DiffusionRepositorySearchConduitAPIMethod.php Trivially implement RepositoryEditEngine and API methods 2016-04-17 16:02:13 -07:00
DiffusionResolveRefsConduitAPIMethod.php Only resolve branch names to branches 2015-04-27 03:51:53 -07:00
DiffusionSearchQueryConduitAPIMethod.php Move the fix for Git 2.16.0 from the "Mercurial" part of the code to the "Git" part of the code 2018-01-26 13:48:35 -08:00
DiffusionTagsQueryConduitAPIMethod.php Version clustered, observed repositories in a reasonable way (by largest discovered HEAD) 2016-05-30 09:53:01 -07:00
DiffusionUpdateCoverageConduitAPIMethod.php Update PhabricatorLiskDAO::chunkSQL() for new %Q semantics 2018-11-13 08:59:18 -08:00
DiffusionURIEditConduitAPIMethod.php Add diffusion.uri.edit for creating and editing repository URIs 2016-04-29 13:55:48 -07:00