Skip to content

Commit

Permalink
replace context.github with context.octokit
Browse files Browse the repository at this point in the history
  • Loading branch information
jetersen authored and dependabot-preview[bot] committed Dec 26, 2020
1 parent fd604c7 commit 68e3739
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lib/commits.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ module.exports.findCommitsWithAssociatedPullRequests = async ({
})

data = await paginate(
context.github.graphql,
context.octokit.graphql,
module.exports.findCommitsWithAssociatedPullRequestsQuery,
{ ...variables, since: lastRelease.created_at },
dataPath
Expand All @@ -101,7 +101,7 @@ module.exports.findCommitsWithAssociatedPullRequests = async ({
log({ app, context, message: `Fetching all commits for reference ${ref}` })

data = await paginate(
context.github.graphql,
context.octokit.graphql,
module.exports.findCommitsWithAssociatedPullRequestsQuery,
variables,
dataPath
Expand Down
8 changes: 4 additions & 4 deletions lib/releases.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ const sortReleases = (releases) => {
}

module.exports.findReleases = async ({ ref, app, context, config }) => {
let releases = await context.github.paginate(
context.github.repos.listReleases.endpoint.merge(
let releases = await context.octokit.paginate(
context.octokit.repos.listReleases.endpoint.merge(
context.repo({
per_page: 100,
})
Expand Down Expand Up @@ -297,7 +297,7 @@ module.exports.generateReleaseInfo = ({
}

module.exports.createRelease = ({ context, releaseInfo }) => {
return context.github.repos.createRelease(
return context.octokit.repos.createRelease(
context.repo({
name: releaseInfo.name,
tag_name: releaseInfo.tag,
Expand All @@ -314,7 +314,7 @@ module.exports.updateRelease = ({ context, draftRelease, releaseInfo }) => {
tag_name: releaseInfo.tag || draftRelease.tag_name,
})

return context.github.repos.updateRelease(
return context.octokit.repos.updateRelease(
context.repo({
release_id: draftRelease.id,
body: releaseInfo.body,
Expand Down

0 comments on commit 68e3739

Please sign in to comment.