When a commit is marked "closeable", clear the "published" flag
commit6f78e2a91c88657dbc6956a86a8a1db1b126e0de
authorepriestley <git@epriestley.com>
Tue, 8 Sep 2020 19:51:09 +0000 (8 12:51 -0700)
committerepriestley <git@epriestley.com>
Wed, 16 Sep 2020 00:36:42 +0000 (15 17:36 -0700)
treec762b1eb510c589dbaf179a3589943d971ebd720
parent737e7c85412ccf75ea1461398a91fea490cd026c
When a commit is marked "closeable", clear the "published" flag

Summary:
Ref T13552. When a previously discovered commit becomes reachable from a permanent ref, we re-queue workers to update it. However, the commit may already be marked as "published", so the publish worker may do nothing.

It would perhaps be simpler to not mark the commit as published when it isn't reachable from a permanent ref, but this is tricky because the flag is also part of the "imported / all steps" state (see T13580).

Until that can be cleaned up, just clear the flag.

Test Plan:
  - Pushed a commit with "fixes X" to a non-permanent branch.
  - Pushed it to a permanent branch.
  - Before change: task failed to close.
  - After change: task closes properly.

Maniphest Tasks: T13552

Differential Revision: https://secure.phabricator.com/D21460
src/applications/repository/engine/PhabricatorRepositoryRefEngine.php