1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-22 06:42:42 +01:00
phorge-phorge/scripts
epriestley d667b12206 Provide a standalone query for resolution of commit author/committer into Phabricator users
Summary:
Ref T4195. To implement the "Author" and "Committer" rules, I need to resolve author/committer strings into Phabricator users.

The code to do this is currently buried in the daemons. Extract it into a standalone query.

I also added `bin/repository lookup-users <commit>` to test this query, both to improve confidence I'm getting this right and to provide a diagnostic command for users, since there's occasionally some confusion over how author/committer strings resolve into valid users.

Test Plan:
I tested this using `bin/repository lookup-users` and `reparse.php --message` on Git, Mercurial and SVN commits. Here's the `lookup-users` output:

  >>> orbital ~/devtools/phabricator $ ./bin/repository lookup-users rINIS3
  Examining commit rINIS3...
  Raw author string: epriestley
  Phabricator user: epriestley (Evan Priestley   )
  Raw committer string: null
  >>> orbital ~/devtools/phabricator $ ./bin/repository lookup-users rPOEMS165b6c54f487c8
  Examining commit rPOEMS165b6c54f487...
  Raw author string: epriestley <git@epriestley.com>
  Phabricator user: epriestley (Evan Priestley   )
  Raw committer string: epriestley <git@epriestley.com>
  Phabricator user: epriestley (Evan Priestley   )
  >>> orbital ~/devtools/phabricator $ ./bin/repository lookup-users rINIH6d24c1aee7741e
  Examining commit rINIH6d24c1aee774...
  Raw author string: epriestley <hg@yghe.net>
  Phabricator user: epriestley (Evan Priestley   )
  Raw committer string: null
  >>> orbital ~/devtools/phabricator $

The `reparse.php` output was similar, and all VCSes resolved authors correctly.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1731, T4195

Differential Revision: https://secure.phabricator.com/D7801
2013-12-19 11:05:17 -08:00
..
aphront Delete license headers from files 2012-11-05 11:16:51 -08:00
cache Update manage_cache.php 2013-11-21 12:36:00 -08:00
calendar Increment year. 2013-01-03 05:45:08 -08:00
celerity Multicolor headers 2013-12-06 12:08:11 -08:00
daemon Add bin/phd log <id> to dump all logs to the CLI 2013-07-23 16:58:19 -07:00
differential Add DifferentialDiffQuery and change most callsites 2013-07-01 12:38:42 -07:00
diviner Port Diviner Core to Phabricator 2013-01-07 14:04:23 -08:00
drydock Drydock blueprint for preallocated remote hosts 2013-11-22 14:34:10 -08:00
fact Delete license headers from files 2012-11-05 11:16:51 -08:00
files Add a bin/files purge workflow 2013-05-29 06:28:57 -07:00
fpm Delete license headers from files 2012-11-05 11:16:51 -08:00
install Simplify the "update_phabricator.sh" script 2013-02-14 07:22:43 -08:00
lipsum First Diff of Test Data Generator 2013-04-12 14:07:16 -07:00
mail Fix two issues with creating Conpherence threads via mail on some configurations 2013-12-12 10:59:28 -08:00
profile Delete license headers from files 2012-11-05 11:16:51 -08:00
repository Provide a standalone query for resolution of commit author/committer into Phabricator users 2013-12-19 11:05:17 -08:00
search Provide 'bin/cache', for managing caches 2013-05-20 10:16:35 -07:00
setup Add bin/policy unlock 2013-10-01 16:01:15 -07:00
sql Add explicit mysql.port configuration 2013-07-14 16:06:23 -07:00
ssh Minor, sort out a change request which was lost in the melee. 2013-12-05 17:37:04 -08:00
symbols Bugfix for D7596 2013-11-17 20:19:49 -08:00
user Warn users about using bin/accountadmin for first time setup 2013-12-02 11:25:42 -08:00
util Provide 'bin/cache', for managing caches 2013-05-20 10:16:35 -07:00
__init_script__.php Consolidate environmental initialization 2012-12-25 06:15:28 -08:00
celerity_mapper.php PHUIPropertyListView 2013-10-11 07:53:56 -07:00