Skip to content

Commit

Permalink
src: rename app.ts to action.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
jamacku committed Feb 10, 2023
1 parent 8bde2c1 commit 322d84f
Show file tree
Hide file tree
Showing 9 changed files with 75 additions and 21 deletions.
3 changes: 3 additions & 0 deletions dist/action.d.ts

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

46 changes: 46 additions & 0 deletions dist/action.js

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

1 change: 1 addition & 0 deletions dist/action.js.map

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

21 changes: 11 additions & 10 deletions dist/index.js

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

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions dist/main.js

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

2 changes: 1 addition & 1 deletion dist/main.js.map

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

4 changes: 2 additions & 2 deletions src/app.ts → src/action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Config } from './config';
import { IssueForm } from './issue-form';
import { Labeler } from './labeler';

const app = (probot: Probot) => {
const action = (probot: Probot) => {
probot.on(
events.issue,
async (context: Context<(typeof events.issue)[number]>) => {
Expand Down Expand Up @@ -64,4 +64,4 @@ const app = (probot: Probot) => {
);
};

export default app;
export default action;
8 changes: 5 additions & 3 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { setFailed } from '@actions/core';
import run from '@probot/adapter-github-actions';

import app from './app';
import action from './action';

try {
await run.run(app);
await run.run(action);
} catch (error) {
if (error instanceof Error) setFailed(error.message);
error instanceof Error
? setFailed(error.message)
: setFailed(error as string);
}

0 comments on commit 322d84f

Please sign in to comment.