-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
update-pr-from-base-branch
- Fix wrong position when check failed
#8410
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
base: main
Are you sure you want to change the base?
Conversation
@@ -115,9 +115,11 @@ async function addButton(mergeBar: Element): Promise<void> { | |||
</div>, | |||
); | |||
} else { | |||
// We need to create a new row when `Checks` is present | |||
const checkFailed = $optional('[aria-label="Checks"]'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This check seems rather arbitrary, the issue is that we use .before() on the wrong element. I think just mergeBar
needs to be update and then maybe use .prepend()
The comment also mentions "old view PR" so maybe the check is failing altogether? According to the existing code, this line should not be reached at all.
Also after this PR it would be great to see pr-commit
working again
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to drop old code and just work on the new version. The widget is already complex as is, we don't need to be slowed down by GitHub Enterprise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't have this [aria-label="Conflicts"]
if check faild. But if check passed, we will get [aria-label="Conflicts"]
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don’t think the two things are related
I think the opposite is true: if there are conflicts, the button appears, but the checks don't run on pull_request
events
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don’t think the two things are related
I mean if there has Conflict
row, we just need to add a update branch button here. But if we don't have this row, we have to creat a new row here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there's a "resolve conflicts" button, the feature must be disabled. That button is already an "update branch" config
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test URLs
#8407
Screenshot
Before:
After: