Skip to content

[codex] fix runtime guard stale log filtering #7

[codex] fix runtime guard stale log filtering

[codex] fix runtime guard stale log filtering #7

name: Hide Codex Rate Limit Comments
on:
issue_comment:
types: [created]
pull_request_review_comment:
types: [created]
jobs:
hide-comment:
runs-on: ubuntu-latest
if: >
github.event.comment.user.login == 'chatgpt-codex-connector[bot]' &&
(
contains(github.event.comment.body, 'usage limit') ||
contains(github.event.comment.body, 'rate limit') ||
contains(github.event.comment.body, 'quota') ||
contains(github.event.comment.body, 'limit reached') ||
contains(github.event.comment.body, 'try again later')
)
permissions:
issues: write
pull-requests: write
steps:
- name: Minimize comment
uses: actions/github-script@v8
with:
script: |
const mutation = `
mutation($id: ID!) {
minimizeComment(input: {subjectId: $id, classifier: OFF_TOPIC}) {
minimizedComment { isMinimized }
}
}
`;
await github.graphql(mutation, { id: context.payload.comment.node_id });
console.log('Minimized codex rate-limit comment:', context.payload.comment.id);