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

CI/BUG: Remove trim() function on comment-commands.yml #60397

Merged

Conversation

KevsterAmp
Copy link
Contributor

@KevsterAmp KevsterAmp commented Nov 22, 2024

Since there are no trim or related split commands on github workflows, you'd have to use a shell to be able to trim it.
See: https://stackoverflow.com/questions/64049306/github-actions-how-to-trim-a-string-in-a-condition

  ...
  - name: Check if person has accepted and signed CLA
    shell: python
    run: |
      import sys

      def check_user_accepted_and_signed(text):
        """Some complex natural language processing will go here"""
      
      comment = '''${{ github.event.comment.body }}'''
      if not check_user_accepted_and_signed(comment):
        sys.exit(1)  # This will abort the job
  - name: Not accepted or signed
    if: ${{ failure() }}
    run: optionally do something if the check fails
  - name: Move on if the check passed
    run: ...

Which in my opinion would be a lot of work and extra compute time for a simple "strip" on comments. I suggest to revert it as original.

@KevsterAmp KevsterAmp changed the title remove trim function on comment-commands.yml CI/BUG: Remove trim() function on comment-commands.yml Nov 22, 2024
@mroeschke mroeschke added the CI Continuous Integration label Nov 22, 2024
@mroeschke mroeschke added this to the 3.0 milestone Nov 22, 2024
@mroeschke mroeschke merged commit d4ae654 into pandas-dev:main Nov 22, 2024
55 checks passed
@mroeschke
Copy link
Member

Thanks @KevsterAmp no worries with introducing the failure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Continuous Integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CI/BUG: comment_commands.yml failing due to invalid trim()
2 participants