1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-01 03:02:43 +01:00
phorge-phorge/src/applications/repository/query
epriestley 874a9b7fe3 When creating or updating a revision, infer the repository from the diff
Summary:
Ref T603. When a diff is attached to a revision, try to guess the repository if possible. In cases where we succeed, this automatically gives us intuitive policy behavior (i.e., you can see a revision if you can see the repository the change is against).

I pulled this into a funky little "Lookup" class for two reasons:

  - It's used in two places;
  - I anticipate that we might need to add some sort of `explainWhy()` method if users find the heuristics confusing.

Test Plan: Created and updated revisions, saw them pick up the correct repository association. Ran Herald dry run against associable and nonassociable revisions, saw correct values populate.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T603

Differential Revision: https://secure.phabricator.com/D7147
2013-09-26 15:28:42 -07:00
..
PhabricatorRepositoryArcanistProjectQuery.php Modernize Releeph project create controller 2013-07-30 12:38:11 -07:00
PhabricatorRepositoryQuery.php When creating or updating a revision, infer the repository from the diff 2013-09-26 15:28:42 -07:00
PhabricatorRepositorySearchEngine.php Allow repositories to be filtered by type 2013-09-19 11:56:48 -07:00
PhabricatorRepositoryTransactionQuery.php Use application PHIDs for application transactions 2013-07-29 12:04:15 -07:00