Changes between Version 2 and Version 3 of Ticket #3674


Ignore:
Timestamp:
02/21/2016 01:52:35 PM (4 years ago)
Author:
fhd
Comment:

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.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #3674

    • Property Component changed from Infrastructure to Sitescripts
  • Ticket #3674 – Description

    v2 v3  
    11=== Background === 
    2 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: `Issue [number] - [message]`. 
     2Whenever 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. 
     3 
     4We can extend this further in the future: 
     5 
     6- We could reject commits that don't specify either an issue or `Noissue` in the canonical format. 
     7- We could automatically close issues once they've been mentioned in a commit. 
     8 
     9But all that is follow-up issue material, we should keep it simple at first. 
    310 
    411=== What to change === 
    5 Write a hook (probably used for either ''incoming'' or ''changegroup'' that inspects the commit message and adds a comment to the issue mentioned. 
    6  
    7 As an added bonus, the hook could reject commits that don't use the right format or that refer to an issue that doesn't exist (note that `Noissue - [message]` is also valid). But that may be something better handled in a follow-up issue. 
     12Write 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.