diff --git a/.github/workflows/update-pr.yml b/.github/workflows/update-pr.yml index 13b345cd..7df710dd 100644 --- a/.github/workflows/update-pr.yml +++ b/.github/workflows/update-pr.yml @@ -6,7 +6,7 @@ jobs: pr_update_text: runs-on: ubuntu-latest steps: - - uses: tzkhan/pr-update-action@v1.1.0 + - uses: tzkhan/pr-update-action@v1.1.1 with: repo-token: "${{ secrets.GITHUB_TOKEN }}" branch-regex: '[a-z\d-_.\/]+' diff --git a/README.md b/README.md index 77353a80..ed20ff71 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ jobs: update_pr: runs-on: ubuntu-latest steps: - - uses: tzkhan/pr-update-action@v1.1.0 + - uses: tzkhan/pr-update-action@v1.1.1 with: repo-token: "${{ secrets.GITHUB_TOKEN }}" # required - allows the action to make calls to GitHub's rest API branch-regex: 'foo-\d+' # required - regex to match text from the head branch name @@ -51,7 +51,7 @@ jobs: pr_update_text: runs-on: ubuntu-latest steps: - - uses: tzkhan/pr-update-action@v1.1.0 + - uses: tzkhan/pr-update-action@v1.1.1 with: repo-token: "${{ secrets.GITHUB_TOKEN }}" branch-regex: 'foo-\d+' diff --git a/dist/index.js b/dist/index.js index 4c532552..8fc26dda 100644 --- a/dist/index.js +++ b/dist/index.js @@ -7514,7 +7514,7 @@ async function run() { pull_number: github.context.payload.pull_request.number, } - const title = github.context.payload.pull_request.title; + const title = github.context.payload.pull_request.title || ''; const processedTitle = inputs.titleTemplate.replace(tokenRegex, match(inputs.uppercaseTitle)); core.debug(`processedTitle: ${processedTitle}`); @@ -7531,7 +7531,7 @@ async function run() { core.warning('PR title is up to date already - no updates made'); } - const body = github.context.payload.pull_request.body; + const body = github.context.payload.pull_request.body || ''; const processedBody = inputs.bodyTemplate.replace(tokenRegex, match(inputs.uppercaseBody)); core.debug(`processedBody: ${processedBody}`); diff --git a/index.js b/index.js index 5e80c331..fb661e79 100644 --- a/index.js +++ b/index.js @@ -38,7 +38,7 @@ async function run() { pull_number: github.context.payload.pull_request.number, } - const title = github.context.payload.pull_request.title; + const title = github.context.payload.pull_request.title || ''; const processedTitle = inputs.titleTemplate.replace(tokenRegex, match(inputs.uppercaseTitle)); core.debug(`processedTitle: ${processedTitle}`); @@ -55,7 +55,7 @@ async function run() { core.warning('PR title is up to date already - no updates made'); } - const body = github.context.payload.pull_request.body; + const body = github.context.payload.pull_request.body || ''; const processedBody = inputs.bodyTemplate.replace(tokenRegex, match(inputs.uppercaseBody)); core.debug(`processedBody: ${processedBody}`); diff --git a/package.json b/package.json index e1feb6a7..666fc938 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pr-update-action", - "version": "1.1.0", + "version": "1.1.1", "description": "PR Update GitHub Action", "main": "index.js", "scripts": {