Skip to content

Commit

Permalink
Bug 1818562: ensure the uplift request form is commented on the bug
Browse files Browse the repository at this point in the history
  • Loading branch information
cgsheeh committed Feb 23, 2023
1 parent efb78de commit dc96c0b
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions extensions/PhabBugz/lib/Feed.pm
Expand Up @@ -397,6 +397,16 @@ sub process_uplift_request_form_change {
my ($timestamp) = Bugzilla->dbh->selectrow_array('SELECT NOW()');
my $phab_bot_user = Bugzilla::User->new({name => PHAB_AUTOMATION_USER});

INFO('Commenting the uplift form on the bug.');

my $comment_content = format_uplift_request_as_markdown($revision->uplift_request);
my $comment_params = {
'is_markdown' => 1,
'isprivate' => 0,
};
$bug->add_comment($comment_content, $comment_params);
$bug->update($timestamp);

# Take no action if the form is empty.
if (ref $revision->uplift_request ne 'HASH'
|| !keys %{$revision->uplift_request})
Expand Down Expand Up @@ -447,15 +457,6 @@ sub process_uplift_request_form_change {
}
}

INFO('Commenting the uplift form on the bug.');

my $comment_content = format_uplift_request_as_markdown($revision->uplift_request);
my $comment_params = {
'is_markdown' => 1,
'isprivate' => 0,
};
$bug->add_comment($comment_content, $comment_params);

# If manual QE is required, set the Bugzilla flag.
if ($revision->uplift_request->{'Needs manual QE test'}) {
INFO('Needs manual QE test is set.');
Expand Down

0 comments on commit dc96c0b

Please sign in to comment.