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

Merge commit message templates are not applied #308

Closed
binury opened this issue Oct 9, 2019 · 5 comments · Fixed by #322
Closed

Merge commit message templates are not applied #308

binury opened this issue Oct 9, 2019 · 5 comments · Fixed by #322

Comments

@binury
Copy link

binury commented Oct 9, 2019

Attempting to use a merge commit template has no effect

Replicate:

  • Enable merge commit template
  • Supply gist
  • Attempt merge
  • Observe default message from Bitbucket

Env:

Chrome | RB 3.18.1

@binury
Copy link
Author

binury commented Oct 9, 2019

(Gist linked above is from feature PR author's example)

@Michaelhobo
Copy link

I'm also seeing this

@Michaelhobo
Copy link

It sort of looks to me like CORB is blocking Refined Bitbucket from reading commits, pull requests, branches, etc.

Here's some console logs from a pull request page:

main.js:15370 Uncaught (in promise) SyntaxError: Unexpected end of JSON input
at get (main.js:15370)
at async pullrequestCommitAmount (main.js:17835)
main.js:15370 Uncaught (in promise) SyntaxError: Unexpected end of JSON input
at get (main.js:15370)
at async getDataToInject (main.js:17328)
at async Promise.all (/.../...cts-instead/index 1)
at async mergeCommitMessage (main.js:17313)
get @ main.js:15370
async function (async)
mergeCommitMessage @ main.js:17311
pullrequestRelatedFeatures @ main.js:17245
init @ main.js:17100
(anonymous) @ main.js:17088
Promise.then (async)
(anonymous) @ main.js:17082
./src/main.js @ main.js:17252
webpack_require @ main.js:20
(anonymous) @ main.js:84
(anonymous) @ main.js:87
main.js:15370 Uncaught (in promise) SyntaxError: Unexpected end of JSON input
at get (main.js:15370)
at async Promise.all (/.../…cts-instead/index 0)
at async addSideBarCounters (main.js:18175)
main.js:15365 Cross-Origin Read Blocking (CORB) blocked cross-origin response https://api.bitbucket.org/2.0/repositories/.../.../pullrequests/.../commits with MIME type application/json. See https://www.chromestatus.com/feature/5629709824032768 for more details.
get @ main.js:15365
getPullrequestCommits @ main.js:15359
pullrequestCommitAmount @ main.js:17835
async function (async)
pullrequestCommitAmount @ main.js:17833
pullrequestRelatedFeatures @ main.js:17241
init @ main.js:17100
(anonymous) @ main.js:17088
Promise.then (async)
(anonymous) @ main.js:17082
./src/main.js @ main.js:17252
webpack_require @ main.js:20
(anonymous) @ main.js:84
(anonymous) @ main.js:87

It looks like this promise is failing: https://github.com/refined-bitbucket/refined-bitbucket/blob/dev/src/merge-commit-message/merge-commit-message.js#L14

This causes the if (template && dataToInject) to always fail.

@reyronald
Copy link
Member

I haven't looked into this yet but I had another bug report come in this week that happened for that reason @Michaelhobo , but I couldn't reproduce it. Requests were going through fine in my browser instance, so not sure exactly what could be causing this for some folks.

I'll look around this weekend, thanks for the hint!

@Michaelhobo
Copy link

No problem, please let me know if you need me to reproduce the problem.

I think if you implement this (linked from the chromestatus link in the console logs), it should fix it: https://www.chromium.org/Home/chromium-security/extension-content-script-fetches

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants