Skip to content

Commit

Permalink
chore: remove unnecessary code
Browse files Browse the repository at this point in the history
  • Loading branch information
hayawata3626 committed Oct 21, 2023
1 parent 8d46e5e commit 1bb821c
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 19 deletions.
2 changes: 1 addition & 1 deletion badges/coverage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 0 additions & 8 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 0 additions & 10 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ export async function run(): Promise<void> {
const pullNumber: number = github.context.payload.pull_request
?.number as number
const GITHUB_TOKEN: string = core.getInput('github-token')
console.log('conditionsInput', conditionsInput)
console.log('owner', owner)
console.log('repo', repo)
console.log('pullNumber', pullNumber)

const response = await axios.get(
`https://api.github.com/repos/${owner}/${repo}/pulls/${pullNumber}/reviews`,
Expand All @@ -57,7 +53,6 @@ export async function run(): Promise<void> {

const teamApprovalStatus: TeamApprovalStatus[] = await Promise.all(
conditions.map(async c => {
console.log(c, 'c')
const res = await axios.get(
`https://api.github.com/orgs/${owner}/teams/${c.team}/members`,
{
Expand All @@ -68,7 +63,6 @@ export async function run(): Promise<void> {
}
)

console.log(res, 'res')
if (!res.data) {
core.setFailed(
'There are no teams for this organization. Or the url is incorrect.'
Expand All @@ -77,8 +71,6 @@ export async function run(): Promise<void> {

const members = res.data

console.log(members, 'members')

return {
team: c.team,
minimumCount: c.minimumCount,
Expand Down Expand Up @@ -110,8 +102,6 @@ export async function run(): Promise<void> {
'The pull request is not approved based on the specified conditions.'
)
}

console.log(response, 'response')
} catch (error) {
if (error instanceof Error) core.setFailed(error.message)
}
Expand Down

0 comments on commit 1bb821c

Please sign in to comment.