Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pr-base-commit errors in attempting to remove a non-existent automerge message #6650

Closed
DanielMiao1 opened this issue May 14, 2023 · 1 comment · Fixed by #6703
Closed

pr-base-commit errors in attempting to remove a non-existent automerge message #6650

DanielMiao1 opened this issue May 14, 2023 · 1 comment · Fixed by #6703
Labels
bug help wanted small Issues that new contributors can pick up

Comments

@DanielMiao1
Copy link
Contributor

DanielMiao1 commented May 14, 2023

Description

Currently, the pr-base-commit feature attempts to remove (view source) the "Merging can be performed automatically" message (see figure 1) from the bottom of a pull request conversations page without verifying the existence of the message.

As the message is only shown to users with sufficient privileges to merge the pull request, the code fails with a warning-level Error <span class="status-meta"> and an Error: Expected node matching "Merging can be performed automatically.", found {actual_content} (see figure 2) when a pull request is viewed by a user who does not have sufficient privileges.

How to replicate the issue + URL

  1. Visit an open, non-blocked, and non-draft pull request that you do not have sufficient privileges to merge and is behind the base branch, such as update sitemap for commit 382e86b DanielMiao1/test#8
  2. The error is raised in the browser console (see figure 2).
     

Figure 1
The Merging can be performed automatically message shown to privileged users before its removal

Figure 1
 

Figure 2
The console error when viewing the page without sufficient privileges

Figure 2

Extension version

23.5.10

Browser(s) used

all supported browsers

@fregante
Copy link
Member

without verifying the existence of the message.

The message you see is the exactly the verification: the text doesn’t match, so it throws an error 😉

Solution:

  • silence error
  • have the text appear on two lines instead of that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug help wanted small Issues that new contributors can pick up
Development

Successfully merging a pull request may close this issue.

2 participants