Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Address empty body #131

Merged
merged 11 commits into from
Feb 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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