Skip to content
This repository was archived by the owner on Jan 24, 2023. It is now read-only.

Commit 189ba8c

Browse files
authored
Fix selector to find PR body element (#26)
Yesterday, I started getting the warning log `failed to find PR body element` in my environment. It seems that the `pull_request[body]` in the selector for PR body element has been changed to `issue[body]`. Could you please check it? FYI: I've confirmed that the change works in my environment. ![SS](https://user-images.githubusercontent.com/1025342/133725653-a6a1e719-e7fe-4449-8510-056de7880977.png)
1 parent 0f0c5a8 commit 189ba8c

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

content.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,13 @@ function copyPrDescription(event) {
1515
return;
1616
};
1717

18-
const prBodyEl = document.querySelector('.comment-form-textarea[name="pull_request[body]"]');
18+
let prBodyEl = document.querySelector('.comment-form-textarea[name="issue[body]"]');
1919
if (!prBodyEl) {
20-
warn('failed to find PR body element');
21-
return;
20+
prBodyEl = document.querySelector('.comment-form-textarea[name="pull_request[body]"]');
21+
if (!prBodyEl) {
22+
warn('failed to find PR body element');
23+
return;
24+
};
2225
};
2326

2427
// When using auto-merge, GitHub has two text fields with the same ID.

0 commit comments

Comments
 (0)