Diffusion - make projects work properly with commits

Summary: Fixes T3189. Now if you say #projects in a commit message they will associate nicely with the commit. Also we record transactions about all this project editing fun.

Test Plan: tested migration by associating some projects with commits and verifying they still showed up post migration. tested adding / removing projects by doing so from the UI, noting transactions written nicely as well

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Projects: #projects

Maniphest Tasks: T3189

Differential Revision: https://secure.phabricator.com/D10877
Fix almanac.queryservices for no results

Summary: Ref T5833. We try to load bindings even if we get no services back.

Test Plan: Queried invalid results.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T5833

Differential Revision: https://secure.phabricator.com/D10880
Clean up Maniphest Batch Editor UI

Summary: Finishes up work on PHUIInsetForm, cleans up the UI a bit when editing multiple tasks

Test Plan:
Edit multiple tasks, apply some new projects, still works as expected.

{F236044}

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D10881
Closing as a duplicate should use "closed" iconography

Summary: Uses the check icon for closed, which is the primary action taken.

Test Plan:
Close as a duplicate, seen new icon.

{F236048}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D10882
Add email preference links to email footers

Summary: Ref T1217, Add link to email preferences to email template

Test Plan: Add comment to object like Maniphest task, check that email has a footer with a link to email preferences.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Maniphest Tasks: T1217

Differential Revision: https://secure.phabricator.com/D10883
Add ReallyMajorEvent to PHUITimelineView

Summary: For actions like "Close" that are in theory stopping the timeline, we should display some disruption to the line itself.

Test Plan:
Tested in UIExamples

{F236077}

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D10884
Minor, increase spacing on buttons

Summary: Increase space, other visual polish

Test Plan: Check UIExamples on buttons and button bar. View policy controls.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D10886
Add workboard link to emails about workboard changes

Summary: Fixes T4652, adding workboard link to emails

Test Plan: Move a task in a workboard from one column to another. Email notification should contain "WORKBOARD" section with link to that workboard

Reviewers: chad, epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Maniphest Tasks: T4652

Differential Revision: https://secure.phabricator.com/D10889
Allow device SSH keys to be trusted

Summary:
Ref T6240. Some discussion in that task. In instance/cluster environments, daemons need to make Conduit calls that bypass policy checks.

We can't just let anyone add SSH keys with this capability to the web directly, because then an adminstrator could just add a key they own and start signing requests with it, bypassing policy checks.

Add a `bin/almanac trust-key --id <x>` workflow for trusting keys. Only trusted keys can sign requests.

Test Plan:
  - Generated a user key.
  - Generated a device key.
  - Trusted a device key.
  - Untrusted a device key.
  - Hit the various errors on trust/untrust.
  - Tried to edit a trusted key.

{F236010}

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T6240

Differential Revision: https://secure.phabricator.com/D10878
Handle SSH generated keys in Conduit passphrase.query

Summary: Fixes T6601

Test Plan: echo '{"ids":["71"],"needPublicKeys":true,"needSecrets":false}' | arc call-conduit passphrase.query

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley

Maniphest Tasks: T6601

Differential Revision: https://secure.phabricator.com/D10885
Align form captions with form elements

Summary: Make captions feel less floaty, align with their input element.

Test Plan:
Visit a few forms with captions, test mobile and desktop layouts

{F236871}

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D10891
Add default policy to Files application

Summary: **WIP** This adds default capability to the Files application

Test Plan: Set default to public, go to Files page, see public preset. Upload File. Doesn't work.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6564

Differential Revision: https://secure.phabricator.com/D10888
Add default View, Edit, and Join Policies to Projects

Summary: Fixes T6567, lets admins set a default policy for new Projects.

Test Plan: Changed the default Policy, created a new Project. Project had correct defaults.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6567

Differential Revision: https://secure.phabricator.com/D10890