Skip to content

Commit

Permalink
try 3
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinigami92 committed Feb 16, 2024
1 parent bf5113a commit 1531c25
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/commentCodeGeneration.cjs

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/commentCodeGeneration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import type { context as ctx, GitHub } from '@actions/github/lib/utils';
* @param context An object containing the context of the workflow run
* @param isSuccess A boolean indicating whether the workflow was successful
*/
export default async (
export async function script(
github: InstanceType<typeof GitHub>,
context: typeof ctx,
isSuccess: boolean
) => {
): Promise<void> {
const { data: comments } = await github.rest.issues.listComments({
owner: context.repo.owner,
repo: context.repo.repo,
Expand Down Expand Up @@ -45,4 +45,4 @@ export default async (
body,
});
}
};
}
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
script: |
const script = require('${{ github.workspace }}/.github/workflows/commentCodeGeneration.cjs')
const { script } = require('${{ github.workspace }}/.github/workflows/commentCodeGeneration.cjs')
await script(github, context, ${{ steps.generate.outcome == 'success' && steps.diff.outcome == 'success' }})
- name: Status
Expand Down

0 comments on commit 1531c25

Please # to comment.