Skip to content

Commit 3b2004a

Browse files
authored
fix(deps)!: update all dependencies (#227)
* ⬆️ update dependencies * ♻️ update GH actions code
1 parent 2b34e8b commit 3b2004a

File tree

7 files changed

+1982
-6052
lines changed

7 files changed

+1982
-6052
lines changed

lib/issues.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
module.exports.create = async function (client, issue) {
44
console.log(`Creating issue ${issue.owner}/${issue.repo}#${issue.labels}`)
5-
const resp = await client.issues.create({
5+
const resp = await client.rest.issues.create({
66
owner: issue.owner,
77
repo: issue.repo,
88
title: issue.title,
@@ -14,7 +14,7 @@ module.exports.create = async function (client, issue) {
1414
}
1515

1616
module.exports.update = async function (client, issue) {
17-
const resp = await client.issues.update({
17+
const resp = await client.rest.issues.update({
1818
owner: issue.owner,
1919
repo: issue.repo,
2020
issue_number: issue.issue_number,
@@ -38,15 +38,15 @@ module.exports.getMeetingIssues = async function (client, opts) {
3838

3939
module.exports.stringifiedIssueTemplate = async function stringifiedIssueTemplate (client, options) {
4040
// fetch the markdown template that we're going to build the meeting issue from
41-
const response = await client.repos.getContents({
41+
const response = await client.rest.repos.getContent({
4242
owner: options.owner,
4343
repo: options.repo,
4444
path: `.github/ISSUE_TEMPLATE/${options.template}`,
4545
ref: options.ref || 'main'
4646
})
4747

4848
// check that we're not trying to parse a file that doesn't exist. If we are, throw.
49-
if (validateThatIssueTemplateExists(response.statusCode) === false) {
49+
if (validateThatIssueTemplateExists(response.status) === false) {
5050
throw new Error('The template that we attempted to fetch (defined by the issueTemplate property, defaulting to ./ISSUE_TEMPLATES/meeting.yml) did not exist.')
5151
}
5252

@@ -55,7 +55,7 @@ module.exports.stringifiedIssueTemplate = async function stringifiedIssueTemplat
5555
}
5656

5757
module.exports.closeIssue = async function closeIssue (client, number, opts) {
58-
const resp = client.issues.update({
58+
const resp = await client.rest.issues.update({
5959
owner: opts.owner,
6060
repo: opts.repo,
6161
issue_number: number,

lib/notes.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ module.exports.create = async function createNote (notesTemplate, opts) {
1717
}
1818

1919
async function getNotesTemplate (client, opts) {
20-
const resp = await client.repos.getContents({
20+
const resp = await client.rest.repos.getContent({
2121
owner: opts.owner,
2222
repo: opts.repo,
2323
path: `.github/meet/${opts.notesTemplate}`
2424
})
25-
if (resp.statusCode === 404) {
25+
if (resp.status === 404) {
2626
return false
2727
}
2828
return Buffer.from(resp.data.content, resp.data.encoding).toString()

0 commit comments

Comments
 (0)