File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -215,7 +215,18 @@ function buildMergifySectionForNewMergeBox () {
215215}
216216
217217
218+ function isGitHubPullRequestPage ( ) {
219+ var url = new URL ( document . location . href ) ;
220+ var parts = url . pathname . split ( "/" ) ;
221+ return parts . length >= 5 && parts [ 3 ] === 'pull' ;
222+ }
223+
224+
218225function tryInject ( ) {
226+ if ( ! isGitHubPullRequestPage ( ) ) {
227+ return
228+ }
229+
219230 var isMergifyEnabledOnTheRepo = document . querySelector ( 'a[href="/apps/mergify"]' )
220231 if ( ! isMergifyEnabledOnTheRepo ) {
221232 return
@@ -234,7 +245,6 @@ function tryInject() {
234245 // New merge box
235246 var detailSection = document . querySelector ( "div.border:nth-child(2)" )
236247 if ( detailSection ) {
237- console . log ( "Injecting Mergify section for new merge box" )
238248 detailSection . insertBefore ( buildMergifySectionForNewMergeBox ( ) , detailSection . firstChild )
239249 }
240250 }
You can’t perform that action at this time.
0 commit comments