Skip to content

Commit

Permalink
Check github2provider format only if exists
Browse files Browse the repository at this point in the history
Fix #94
  • Loading branch information
DavideViolante committed Feb 7, 2023
1 parent 79f46a0 commit 56c4ad2
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
pr-reviews-reminder:
runs-on: ubuntu-latest
steps:
- uses: davideviolante/[email protected].1
- uses: davideviolante/[email protected].2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10546,7 +10546,7 @@ async function main() {
core.info(`There are ${pullRequestsWithoutLabel.length} pull requests waiting for reviews`);
if (pullRequestsWithoutLabel.length) {
const pr2user = createPr2UserArray(pullRequestsWithoutLabel);
if (!checkGithubProviderFormat(github2providerString)) {
if (github2providerString && !checkGithubProviderFormat(github2providerString)) {
core.setFailed(`The github-provider-map string is not in correct format: "name1:id1,name2:id2,..."`);
}
const github2provider = stringToObject(github2providerString);
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ async function main() {
core.info(`There are ${pullRequestsWithoutLabel.length} pull requests waiting for reviews`);
if (pullRequestsWithoutLabel.length) {
const pr2user = createPr2UserArray(pullRequestsWithoutLabel);
if (!checkGithubProviderFormat(github2providerString)) {
if (github2providerString && !checkGithubProviderFormat(github2providerString)) {
core.setFailed(`The github-provider-map string is not in correct format: "name1:id1,name2:id2,..."`);
}
const github2provider = stringToObject(github2providerString);
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pr-reviews-reminder-action",
"version": "2.3.1",
"version": "2.3.2",
"description": "Reminder for Pull Request pending reviews",
"scripts": {
"build": "ncc build index.js",
Expand Down

0 comments on commit 56c4ad2

Please sign in to comment.