Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lhansford committed Oct 6, 2023
1 parent 14ae3ea commit b85a8e7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ The difference in commits needed before sending a message in Slack. Default: `5`

```yml
uses: fishbrain/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Only needs read permissions for the repo
with:
owner: fishbrain
repository: outstanding-pull-requests-action
Expand Down
8 changes: 6 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Octokit } from '@octokit/rest';
import { WebClient } from '@slack/web-api';
import { error, getInput, info } from '@actions/core';
import { error, getInput, info, setFailed } from '@actions/core';

const repo = getInput('repository', { required: true });
const owner = getInput('owner', { required: true });
Expand Down Expand Up @@ -64,4 +64,8 @@ async function checkOutstandingPrs() {

checkOutstandingPrs()
.then(() => info('Finished check.'))
.catch(e => error(e));
.catch(e => {
error(e);
error(e.message);
setFailed(e);
});

0 comments on commit b85a8e7

Please sign in to comment.