Skip to content

Commit

Permalink
chore: update package
Browse files Browse the repository at this point in the history
  • Loading branch information
dessant committed Jul 9, 2021
1 parent 7c35b1c commit 8446aa6
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28579,7 +28579,10 @@ class App {
threadData.user.login
);

await this.client.issues.createComment({...issue, body: commentBody});
await this.client.rest.issues.createComment({
...issue,
body: commentBody
});
}
});
}
Expand All @@ -28592,7 +28595,7 @@ class App {

if (newLabels.length) {
core.debug('Labeling');
await this.client.issues.addLabels({
await this.client.rest.issues.addLabels({
...issue,
labels: newLabels
});
Expand All @@ -28607,7 +28610,7 @@ class App {

for (const label of matchingLabels) {
core.debug('Unlabeling');
await this.client.issues.removeLabel({
await this.client.rest.issues.removeLabel({
...issue,
name: label
});
Expand All @@ -28616,12 +28619,12 @@ class App {

if (actions.reopen && threadData.state === 'closed' && !threadData.merged) {
core.debug('Reopening');
await this.client.issues.update({...issue, state: 'open'});
await this.client.rest.issues.update({...issue, state: 'open'});
}

if (actions.close && threadData.state === 'open') {
core.debug('Closing');
await this.client.issues.update({...issue, state: 'closed'});
await this.client.rest.issues.update({...issue, state: 'closed'});
}

if (actions.lock && !threadData.locked) {
Expand All @@ -28636,12 +28639,12 @@ class App {
}
});
}
await this.client.issues.lock(params);
await this.client.rest.issues.lock(params);
}

if (actions.unlock && threadData.locked) {
core.debug('Unlocking');
await this.client.issues.unlock(issue);
await this.client.rest.issues.unlock(issue);
}
}

Expand All @@ -28666,15 +28669,15 @@ class App {
async ensureUnlock(issue, lock, action) {
if (lock.active) {
if (!lock.hasOwnProperty('reason')) {
const {data: issueData} = await this.client.issues.get({
const {data: issueData} = await this.client.rest.issues.get({
...issue,
headers: {
Accept: 'application/vnd.github.sailor-v-preview+json'
}
});
lock.reason = issueData.active_lock_reason;
}
await this.client.issues.unlock(issue);
await this.client.rest.issues.unlock(issue);

let actionError;
try {
Expand All @@ -28692,7 +28695,7 @@ class App {
}
};
}
await this.client.issues.lock(issue);
await this.client.rest.issues.lock(issue);

if (actionError) {
throw actionError;
Expand Down Expand Up @@ -28724,7 +28727,7 @@ async function getActionConfig(client, configPath) {
try {
({
data: {content: configData}
} = await client.repos.getContent({
} = await client.rest.repos.getContent({
...github.context.repo,
path: configPath
}));
Expand Down

0 comments on commit 8446aa6

Please sign in to comment.