Change ReviewRequest.createFromCommit to return a promise.

Review Request #11632 — Created May 27, 2021 and submitted

Information

Review Board
master

Reviewers

This change updates the post-commit review request creation method to
return a promise instead of using callbacks for success and error.

  • Ran js-tests.
  • Created a post-commit review request.
Summary ID
Change ReviewRequest.createFromCommit to return a promise.
This change updates the post-commit review request creation method to return a promise instead of using callbacks for success and error. Testing Done: - Ran js-tests. - Created a post-commit review request.
d63d650176739c578c24bf16243b4c1eadb186d2
Description From Last Updated

Col: 44 'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').

reviewbotreviewbot

Col: 27 'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').

reviewbotreviewbot

Col: 44 'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').

reviewbotreviewbot

The description went missing.

chipx86chipx86
Checks run (1 failed, 1 succeeded)
flake8 passed.
JSHint failed.

JSHint

chipx86
  1. The code itself looks fine.

    Before I jump into the other files, the thing we just really need to figure out is what we consider to be API-stable. While I have no idea which parts of the JS codebase are in use elsewhere, we do offer JavaScript extensions and those are in use extensively at some places. So I'm tempted to say we should avoid breaking function signatures wherever possible, especially in areas that interface with the API (like resources/).

    The updates here remove options and replace it with a commitID argument. I'm fine with this, but if we do it, we should retain backwards-compatibility (check whether we have an object or a string) and go through a deprecation warning process like we do on the Python side.

  2. 
      
david
chipx86
  1. 
      
  2. The description went missing.

  3. 
      
david
chipx86
  1. Ship It!
  2. 
      
david
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to master (0a0932b)
Loading...