Skip to content

Commit

Permalink
Merge pull request #131 from JJ/dev
Browse files Browse the repository at this point in the history
Address empty body
  • Loading branch information
JJ authored Feb 16, 2024
2 parents 1f0227b + 8f4f1f6 commit 5d7f706
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/local-testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Dev check PR
uses: JJ/github-pr-contains-action@dev
uses: JJ/github-pr-contains-action@dev # Change this to whatever branch you want to test
id: dev_check_pr
with:
github-token: ${{github.token}}
Expand All @@ -23,7 +23,7 @@ jobs:
run: |
echo "::warning::We got files: $NUMBER_OF_FILES"
- name: Fail if too big
if: ${{ steps.dev_check_pr.outputs.numberOfFiles > 3 }}
if: ${{ steps.dev_check_pr.outputs.numberOfFiles > 6 }}
env:
NUMBER_OF_FILES : ${{ steps.dev_check_pr.outputs.numberOfFiles }}
run: |
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ function run() {
const PRBody = pull_request === null || pull_request === void 0 ? void 0 : pull_request.body;
core.info("Checking body contents");
if (!PRBody) {
core.setFailed("❌ The body is empty, can't check");
core.warning("⚠️ The PR body is empty, skipping checks");
}
else {
if (bodyContains && !(0, utils_1.rexify)(bodyContains).test(PRBody)) {
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "github-pr-contains-action",
"version": "12",
"version": "14",
"private": false,
"description": "An action that performs checks on PRs",
"main": "lib/main.js",
Expand Down
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ async function run() {
const PRBody = pull_request?.body;
core.info("Checking body contents");
if (!PRBody) {
core.setFailed("❌ The body is empty, can't check");
core.warning("⚠️ The PR body is empty, skipping checks");
} else {
if (bodyContains && !rexify(bodyContains).test(PRBody)) {
core.setFailed(
Expand Down

0 comments on commit 5d7f706

Please sign in to comment.