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 prosoponator bot - add missing body for approve/disapprove operations #1236

Merged
merged 3 commits into from
Jun 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions dev/prosoponator-bot/src/bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import * as core from '@actions/core'
import * as github from '@actions/github'

async function disapprove(args: string[]) {

Check warning on line 17 in dev/prosoponator-bot/src/bot.ts

View workflow job for this annotation

GitHub Actions / check

'args' is defined but never used
console.log('disapprove')
const token = core.getInput('github-token') || process.env.GITHUB_TOKEN || process.env.GH_TOKEN || ''
const octokit = github.getOctokit(token)
Expand All @@ -31,11 +31,12 @@
repo: github.context.repo.repo,
pull_number: github.context.payload.issue!.number,
event: 'REQUEST_CHANGES',
body: `Disapproved by @${github.context.actor}`,
})
console.log('done')
}

async function approve(args: string[]) {

Check warning on line 39 in dev/prosoponator-bot/src/bot.ts

View workflow job for this annotation

GitHub Actions / check

'args' is defined but never used
console.log('approve')
const token = core.getInput('github-token') || process.env.GITHUB_TOKEN || process.env.GH_TOKEN || ''
const octokit = github.getOctokit(token)
Expand All @@ -52,11 +53,12 @@
repo: github.context.repo.repo,
pull_number: github.context.payload.issue!.number,
event: 'APPROVE',
body: `Approved by @${github.context.actor}`,
})
console.log('done')
}

async function help(args: string[]) {

Check warning on line 61 in dev/prosoponator-bot/src/bot.ts

View workflow job for this annotation

GitHub Actions / check

'args' is defined but never used
console.log('help')
const token = core.getInput('github-token') || process.env.GITHUB_TOKEN || process.env.GH_TOKEN || ''
const octokit = github.getOctokit(token)
Expand All @@ -69,7 +71,7 @@
console.log('done')
}

async function usage(args: string[]) {

Check warning on line 74 in dev/prosoponator-bot/src/bot.ts

View workflow job for this annotation

GitHub Actions / check

'args' is defined but never used
console.log('usage')
const token = core.getInput('github-token') || process.env.GITHUB_TOKEN || process.env.GH_TOKEN || ''
const octokit = github.getOctokit(token)
Expand Down
Loading