mirror of
https://github.com/projectsend/projectsend.git
synced 2026-09-23 03:53:21 +00:00
Accept a CLA signature that has line breaks after it
The CLA job only ran for a comment exactly equal to the signing phrase. @JensS signed on #1792 with the phrase followed by line breaks ("...sign the CLA\r\n\r\n\n"), the comparison failed, the job was skipped, and the signature was never recorded, so all three of his pull requests still show the CLA as unsigned. The action itself matches the phrase loosely. The filter in front of it now does too: contains() for the signature, startsWith() for recheck, both case-insensitive. It still keeps the job off ordinary comments, which is what it is there for.
This commit is contained in:
@@ -41,11 +41,19 @@ jobs:
|
||||
# `issue.pull_request` is present only when the comment is on a pull
|
||||
# request; comments on ordinary issues have nothing for this action to
|
||||
# check.
|
||||
#
|
||||
# Loose on purpose, never `==`. The action matches the signing phrase
|
||||
# loosely itself -- any case, anything around it -- and this filter has
|
||||
# to be at least as forgiving, or it throws away signatures the action
|
||||
# would have accepted. It did: a contributor's signature arrived with
|
||||
# trailing line breaks ("...sign the CLA\r\n\r\n"), the exact match
|
||||
# skipped the job, and nothing was recorded. `contains` and
|
||||
# `startsWith` ignore case here as well.
|
||||
if: >-
|
||||
github.event_name == 'pull_request_target'
|
||||
|| (github.event.issue.pull_request
|
||||
&& (github.event.comment.body == 'recheck'
|
||||
|| github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA'))
|
||||
&& (startsWith(github.event.comment.body, 'recheck')
|
||||
|| contains(github.event.comment.body, 'I have read the CLA Document and I hereby sign the CLA')))
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: CLA check
|
||||
|
||||
Reference in New Issue
Block a user