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

Unable to get issue comment with id: [...] #41

Open
DecimalTurn opened this issue Aug 26, 2024 · 6 comments
Open

Unable to get issue comment with id: [...] #41

DecimalTurn opened this issue Aug 26, 2024 · 6 comments
Assignees

Comments

@DecimalTurn
Copy link

DecimalTurn commented Aug 26, 2024

I'm getting an error when the action tries to access a comment:
https://github.com/DecimalTurn/VBA-on-GitHub-Automations/actions/runs/10566141857

(This prevents the action from applying the filter on this comment).

My yaml file
name: Comments filter

on:
  issue_comment:
    types: [created, edited]
#  issues:
#    types: [opened, edited, reopened]
#  pull_request:
#    types: [opened, edited, reopened]

permissions:
  issues: write
  pull-requests: write

jobs:
  apply-filter:
    name: Apply comment filter
    runs-on: ubuntu-latest

    steps:
    
    # DDOS protection (optional - mostly useful for self-hosted GitHub servers)
    #- name: Harden Runner
    #  uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
    #  with:
    #    egress-policy: audit

    - name: Comment filter
      if: ${{ github.actor != 'dependabot[bot]' && github.actor != 'github-actions[bot]'  }}
      uses: IEvangelist/profanity-filter@7b35b30e0d01d3c4a63a57b2ec5db0768bc4d53b # v1.0.74
      id: profanity-filter
      with:
        token: ${{ secrets.GITHUB_TOKEN }}
        replacement-strategy: redacted-rectangle
@DecimalTurn
Copy link
Author

DecimalTurn commented Aug 26, 2024

Seems like the donet/docs repo is also having this issue: https://github.com/dotnet/docs/actions/runs/10492792116?pr=42254+%28comment%29

image

@IEvangelist
Copy link
Owner

I'm looking into this now, thanks for posting the issue.

@IEvangelist IEvangelist self-assigned this Aug 28, 2024
@IEvangelist
Copy link
Owner

I reported this upstream, the issue seems to be something related to the GitHub.Octokit.SDK that my Actions.Octokit library is relying on.

octokit/dotnet-sdk#117

@DecimalTurn
Copy link
Author

Thanks for the follow up!

Sidenote: Shouldn't the action fail in cases like this? The fact it's failling silently makes it harder to notice that something isn't working properly.

@IEvangelist
Copy link
Owner

Shouldn't the action fail in cases like this? The fact it's failling silently makes it harder to notice that something isn't working properly.

I've thought about this before. In most of our use-cases, we don't want a failure. It's intended to run and filter profane content. If it fails in doing so, it's not the end of the world. We just didn't want a failure to cause issues with preventing a PR for example from being mergeable. Does that make sense?

@DecimalTurn
Copy link
Author

Yeah, I guess it does make sense for PR creation.

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

No branches or pull requests

7 participants
@IEvangelist @DecimalTurn and others