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

refactor: client syntax to match modern Gofer #58

Merged
merged 3 commits into from
Mar 26, 2021
Merged

refactor: client syntax to match modern Gofer #58

merged 3 commits into from
Mar 26, 2021

Conversation

aaarichter
Copy link

follow up to #57 (comment)

  • change client syntax to match modern Gofer

lib/github/client.js Outdated Show resolved Hide resolved
lib/github/client.js Outdated Show resolved Hide resolved
@aaarichter aaarichter force-pushed the client branch 3 times, most recently from 84fd239 to 399476c Compare February 6, 2020 12:20
* @return {Promise<any>}
*/
create: label =>
this.get('/repos/{owner}/{repo}/labels', {
method: 'POST',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this.post() ?

* @return {FetchResponse}
*/
setForIssue: (issueId, labels) =>
this.get('/repos/{owner}/{repo}/issues/{issueId}/labels', {
method: 'PUT',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this.put()

*/
get: pullId =>
this.get('/repos/{owner}/{repo}/pulls/{pullId}', {
pathParams: { pullId },
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pathParams: { pullId },
pathParams: { pullId },
endpointName: 'pull.get',

ideally, stick endpointName on all of these (one downside of the class syntax)

Copy link
Member

@aotarola aotarola left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💚

@aaarichter aaarichter merged commit a3799e1 into master Mar 26, 2021
@aaarichter aaarichter deleted the client branch March 26, 2021 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants