Opened 4 years ago

Last modified 9 months ago

#3674 closed change

Write a hg hook that adds a comment on the relevant issue for each commit — at Version 3

Reported by: fhd Assignee: fhd
Priority: P4 Milestone:
Module: Sitescripts Keywords:
Cc: Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

Description (last modified by fhd)


Whenever we currently commit something linked to a specific issue, we manually add a comment pointing to that commit. That's fairly easy to automate, since commits always have the same format.

We can extend this further in the future:

  • We could reject commits that don't specify either an issue or Noissue in the canonical format.
  • We could automatically close issues once they've been mentioned in a commit.

But all that is follow-up issue material, we should keep it simple at first.

What to change

Write a changegroup hook that inspects the changeset descriptions and checks if an issue was referenced (the canonical format for that is: Issue [number] - [message]). If an issue was referenced, the hook should post a comment to the respective issue, posting the changeset URL.

Change History (3)

comment:1 Changed 4 years ago by fhd

  • Component changed from Sitescripts to Infrastructure

Will probably end up in infrastructure rather than sitescripts because an internal hook makes more sense. But the jury is still out I suppose.

comment:2 Changed 4 years ago by fhd

  • Description modified (diff)

comment:3 Changed 4 years ago by fhd

  • Component changed from Infrastructure to Sitescripts
  • Description modified (diff)

Silly me, internal hooks are just modules somewhere on the PYTHONPATH, sitescripts it is.

Also updating the description a bit, I want to keep it simple for now.

Note: See TracTickets for help on using tickets.