Skip to content

Commit

Permalink
Fix change log action condition to write warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Strech committed Dec 5, 2024
1 parent 838ce44 commit a043624
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/ensure-changelog-entry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,11 @@ jobs:
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const isMember = ${{steps.membership.outputs.result}}
const regex = /\*\*Change log entry\*\*\s+(?:(?<answer_yes>yes|yep|yeah)(?:\.\s*(?<yes_message>[^\r\n<!-]+))?|(?<answer_no>no|nope|none)\.?)\s*/mi
const entry = context.payload.pull_request.body.match(regex)
const isWriteComment =
!isMember
|| null === entry
null === entry
|| (undefined === entry.groups.answer_yes && undefined === entry.groups.answer_no)
|| (undefined !== entry.groups.answer_yes && undefined === entry.groups.yes_message)
|| (undefined !== entry.groups.answer_yes && "" === entry.groups.yes_message.trim())
Expand Down

0 comments on commit a043624

Please sign in to comment.