Skip to content

Commit

Permalink
Bug 1930197 - Add an option (or config) to not set the qe-verify+ fla…
Browse files Browse the repository at this point in the history
…g when a GitHub push closes a bug in a given product
  • Loading branch information
dklawren authored Feb 6, 2025
1 parent a2f8463 commit fb13bf0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Bugzilla/API/V1/Github.pm
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,8 @@ sub push_comment {
$set_all->{resolution} = 'FIXED';

# Update the qe-verify flag if not set and the bug was closed.
# Do not perform this change if Fenix or Focus product.
if ($bug->product ne 'Fenix' && $bug->product ne 'Focus') {
# Do not set the flag if the no-qe-verify parameter is true.
if (!$self->param('no-qe-verify')) {
my $found_flag;
foreach my $flag (@{$bug->flags}) {

Expand Down
6 changes: 3 additions & 3 deletions qa/t/rest_github_push_comment.t
Original file line number Diff line number Diff line change
Expand Up @@ -295,9 +295,10 @@ $payload = {
};

# Post the valid GitHub event to the rest/github/push_comment API endpoint
# Also pass in the no-qe-verify option so that the qe-verify flag is not set
$t->post_ok(
$url
. 'rest/github/push_comment' => {
. 'rest/github/push_comment?no-qe-verify=1' => {
'X-Hub-Signature-256' => generate_payload_signature($secret, $payload),
'X-GitHub-Event' => 'push'
} => json => $payload
Expand Down Expand Up @@ -329,8 +330,7 @@ $t->get_ok($url
->json_is('/bugs/0/resolution', 'FIXED')
->json_is('/bugs/0/cf_status_firefox111', 'fixed')
->json_is('/bugs/0/target_milestone', '111 Branch')
->json_is('/bugs/0/flags/0/name', 'qe-verify')
->json_is('/bugs/0/flags/0/status', '+');
->json_hasnt('/bugs/0/flags/0/name', 'qe-verify');

# Change to make sure the flag change entry is recorded properly in the bug history
$t->get_ok(
Expand Down

0 comments on commit fb13bf0

Please sign in to comment.