Skip to content

Commit

Permalink
Merge branch 'main' of github.com:kdvalin/pr-requirements into invali…
Browse files Browse the repository at this point in the history
…d_pr
  • Loading branch information
kdvalin committed Dec 9, 2024
2 parents 88d6b63 + 433a589 commit c664737
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ on:
pull_request:
branches:
- main
push:
branches:
- main

permissions:
contents: read
Expand Down
7 changes: 3 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
import { run } from './main'
import * as core from '@actions/core'


// eslint-disable-next-line @typescript-eslint/no-floating-promises
run().catch((error) => {
if (error instanceof Error) core.setFailed(error.message)
});
run().catch(error => {
if (error instanceof Error) core.setFailed(error.message)
})
13 changes: 7 additions & 6 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import * as core from '@actions/core'
import * as github from '@actions/github';

import * as github from '@actions/github'

/**
* The main function for the action.
* @returns {Promise<void>} Resolves when the action is complete.
*/
export async function run(): Promise<void> {

Check failure on line 8 in src/main.ts

View workflow job for this annotation

GitHub Actions / TypeScript Tests

Async function 'run' has no 'await' expression

Check failure on line 8 in src/main.ts

View workflow job for this annotation

GitHub Actions / Lint Codebase

Async function 'run' has no 'await' expression
if(github.context.eventName !== "pull_request") {
core.setFailed(`This action expects pull_request event types, received ${github.context.eventName}`);
return;
if (github.context.eventName !== 'pull_request') {
core.setFailed(
`This action expects pull_request event types, received ${github.context.eventName}`
)
return
}
const octokit = github.getOctokit(core.getInput('myToken'));
const octokit = github.getOctokit(core.getInput('myToken'))

Check failure on line 15 in src/main.ts

View workflow job for this annotation

GitHub Actions / TypeScript Tests

'octokit' is assigned a value but never used

Check failure on line 15 in src/main.ts

View workflow job for this annotation

GitHub Actions / Lint Codebase

'octokit' is assigned a value but never used
}

0 comments on commit c664737

Please sign in to comment.