ubiquity-os / permit-generation

A standalone module to generate permits.
1 stars 19 forks source link

fix: update octokit method calls to use the rest API #97

Closed gentlementlegen closed 5 days ago

gentlementlegen commented 5 days ago

Ensure that the rest calls of Octokit are used. @rndquu RFC, no logic has changed besides that.

rndquu commented 4 days ago

Ensure that the rest calls of Octokit are used. @rndquu RFC, no logic has changed besides that.

  1. octokit.users.getByUsername()
  2. octokit.rest.users.getByUsername()

The difference between the lines above is that in the 1st case graphql API may be used?

ubiquity-os-beta[bot] commented 4 days ago
! Error: HttpError: Resource not accessible by integration - https://docs.github.com/rest/issues/comments#create-an-issue-comment
gentlementlegen commented 4 days ago

The rest is the modern way to use Octokit. The other way will be deprecated from what I've read. Our packages use the modern way (so does the SDK) so the octokit instance has to be used that way otherwise the methods don't exist. Octokit.graphql is also available indeed.

ubiquity-os-beta[bot] commented 4 days ago
! Error: HttpError: Resource not accessible by integration - https://docs.github.com/rest/issues/comments#create-an-issue-comment