System note for label change event

Scenario 1

  • The label referenced in the system note exists.
  • The system note would be rendered as @victorwu added ~Discussion label · 1 week ago.
  • Use same existing text formatting / wording as existing system notes for removing, for multiple labels, for mix-and-match.

Scenario 2

  • The label referenced in the system note was removed after the event itself happened, due to the label being removed.
  • The system note would be rendered as @victorwu added a deleted label · 1 week ago
  • Use same existing text formatting / wording as existing system notes for removing, for multiple labels, for mix-and-match.

Scenario 3

  • Handle promoted labels.
  • A project label is added to an issue. Later on, that label is promoted to a group label, and so the project label itself is deleted.
  • When promoting labels, the system notes should change the label they're pointing to. First, they point to a project label, which is deleted upon promotion, and so they then point to the group label. Here's an example:
    1. Project label “hello” is added to an issue: @victorwu added [hello] label · 1 week ago
    2. The project label is promoted to a group label: The system note is unchanged
    3. The group label changes color: The label color changes in the system note
    4. The group label changes name to be “helloworld”: The label name changes in the system note to @victorwu added [helloworld] label · 1 week ago
    5. The group label is promoted again to a higher group. (A future feature.): The system note is unchanged
    6. The group label is deleted: the system note now reads @victorwu added a deleted label · 1 week ago

Scenario 4

  • An issued is moved to a different project. What happens behind the scenes is that the original issue is closed and a new one is opened.
  • All the system notes from the original issue are copied to the new issue.
  • For the system notes that are copied over, that refer to a still existing label, render it by referencing where the label came from, same as raccoondogs/chicken#3 (comment 83812389). (So no change in existing user-facing functionality.)
  • For the system notes that are copied over, that refer to a deleted label, follow Scenario 2.

Scenario 5

Edited by Jan Provaznik