mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Mention the target of merge requests in emails
When sending the initial notification email for a merge request, include the name of the package base that is the target of the requested merge operation. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
parent
42d927366a
commit
e9b13cef3f
1 changed files with 15 additions and 5 deletions
|
@ -148,11 +148,21 @@ function pkgreq_file($ids, $type, $merge_into, $comments) {
|
||||||
* user who posted the comment was in.
|
* user who posted the comment was in.
|
||||||
*/
|
*/
|
||||||
$username = username_from_sid($_COOKIE['AURSID']);
|
$username = username_from_sid($_COOKIE['AURSID']);
|
||||||
|
if ($type == 'merge') {
|
||||||
|
$body =
|
||||||
|
$username . " [1] filed a request to merge " .
|
||||||
|
$row['Name'] . " [2] into " . $merge_into .
|
||||||
|
" [3]:\n\n" . $comments . "\n\n" .
|
||||||
|
"[1] " . $AUR_LOCATION . get_user_uri($username) . "\n" .
|
||||||
|
"[2] " . $AUR_LOCATION . get_pkgbase_uri($row['Name']) . "\n" .
|
||||||
|
"[3] " . $AUR_LOCATION . get_pkgbase_uri($merge_into) . "\n";
|
||||||
|
} else {
|
||||||
$body =
|
$body =
|
||||||
$username . " [1] filed a " . $type . " request for " .
|
$username . " [1] filed a " . $type . " request for " .
|
||||||
$row['Name'] . " [2]:\n\n" . $comments . "\n\n" .
|
$row['Name'] . " [2]:\n\n" . $comments . "\n\n" .
|
||||||
"[1] " . $AUR_LOCATION . get_user_uri($username) . "\n" .
|
"[1] " . $AUR_LOCATION . get_user_uri($username) . "\n" .
|
||||||
"[2] " . $AUR_LOCATION . get_pkgbase_uri($row['Name']) . "\n";
|
"[2] " . $AUR_LOCATION . get_pkgbase_uri($row['Name']) . "\n";
|
||||||
|
}
|
||||||
$body = wordwrap($body, 70);
|
$body = wordwrap($body, 70);
|
||||||
$headers = "MIME-Version: 1.0\r\n" .
|
$headers = "MIME-Version: 1.0\r\n" .
|
||||||
"Content-type: text/plain; charset=UTF-8\r\n" .
|
"Content-type: text/plain; charset=UTF-8\r\n" .
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue