Opened 8 years ago

Closed 8 years ago

#52890 closed enhancement (fixed)

trac-github-update/git-multimail: commit notification emails should use correct timestamp for sorting

Reported by: raimue (Rainer Müller) Owned by: admin@…
Priority: Normal Milestone:
Component: server/hosting Version: 2.3.4
Keywords: Cc:
Port:

Description

Commit notification mails currently always use the current time and date. When the delivery of the payload by the GitHub webhook is delayed, for example by a downtime of Trac and then clicking the "Redeliver" button on GitHub, commit mails may arrive that appear to be newer than other mails.

Unfortunately, the GitHub webhook payload does not include the timestamp when the push actually happened. Assuming that the rebasing on top of master happened closely before the push. The closest timestamp for sorting we could use would be the committer date of the latest commit that was pushed.

Change History (3)

comment:1 Changed 8 years ago by raimue (Rainer Müller)

This will require patching git-multimail, as it does not allow to overwrite the time and date at the moment:

comment:2 Changed 8 years ago by raimue (Rainer Müller)

Turns out this is easier than thought in Python with monkey patching:

Last edited 8 years ago by raimue (Rainer Müller) (previous) (diff)

comment:3 Changed 8 years ago by raimue (Rainer Müller)

Resolution: fixed
Status: newclosed

In 5b6df91/trac.macports.org:

trac-github-update: fake date and time of emails

Closes: #52890

Note: See TracTickets for help on using tickets.