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

Fix: Adjust usage of octokit #268

Merged
merged 1 commit into from
Nov 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/close.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,21 @@ jobs:
const actor = context.actor;

if (actors.includes(actor)) {
github.issues.createComment({
github.rest.issues.createComment({
body: "I'm sorry, @" + actor + ". I'm afraid you can't do that.",
issue_number: pullRequest.number,
owner: repository.owner,
repo: repository.repo,
});

github.pulls.update({
github.rest.pulls.update({
owner: repository.owner,
pull_number: pullRequest.number,
repo: repository.repo,
state: "closed",
});

github.issues.lock({
github.rest.issues.lock({
issue_number: pullRequest.number,
lock_reason: "off-topic",
owner: repository.owner,
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integrate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ jobs:
const pullRequest = context.payload.pull_request
const repository = context.repo

await github.pulls.merge({
await github.rest.pulls.merge({
merge_method: "merge",
owner: repository.owner,
pull_number: pullRequest.number,
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/triage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
if (matches instanceof Array && branchPrefixLabels.hasOwnProperty(matches[1])) {
const label = branchPrefixLabels[matches[1]]

github.issues.addLabels({
github.rest.issues.addLabels({
issue_number: pullRequest.number,
labels: [
label
Expand Down