Repository navigation
ci: add no-ai-lines check - #8
ricardofrantz wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
1 issue found across 1 file
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name=".github/workflows/no-ai-lines.yml">
<violation number="1" location=".github/workflows/no-ai-lines.yml:39">
P2: A failed `jq` call inside `$(...)` passed as an argument is ignored under `set -e`, so the check silently passes on an empty value. Assign the output to a variable first, for example `title=$(jq ...)` on its own line, so the failure aborts the step.</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
| fi | ||
| } | ||
| if [ "$EVENT_NAME" = pull_request ]; then | ||
| check "PR title" "$(jq -r '.pull_request.title // ""' "$GITHUB_EVENT_PATH")" |
There was a problem hiding this comment.
P2: A failed jq call inside $(...) passed as an argument is ignored under set -e, so the check silently passes on an empty value. Assign the output to a variable first, for example title=$(jq ...) on its own line, so the failure aborts the step.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At .github/workflows/no-ai-lines.yml, line 39:
<comment>A failed `jq` call inside `$(...)` passed as an argument is ignored under `set -e`, so the check silently passes on an empty value. Assign the output to a variable first, for example `title=$(jq ...)` on its own line, so the failure aborts the step.</comment>
<file context>
@@ -0,0 +1,56 @@
+ fi
+ }
+ if [ "$EVENT_NAME" = pull_request ]; then
+ check "PR title" "$(jq -r '.pull_request.title // ""' "$GITHUB_EVENT_PATH")"
+ check "PR body" "$(jq -r '.pull_request.body // ""' "$GITHUB_EVENT_PATH")"
+ gh api --paginate "repos/$REPO/pulls/$PR_NUMBER/commits" \
</file context>
There was a problem hiding this comment.
1 issue found across 1 file (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name=".github/workflows/no-ai-lines.yml">
<violation number="1" location=".github/workflows/no-ai-lines.yml:29">
P2: The new `devin`, `kimi` and `gpt` alternatives match human names as well as AI tools. A commit with `Co-authored-by: Devin Smith <...>` now fails the check. Drop these bare tokens, or anchor them to an email or a tool-specific form.</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
| PR_NUMBER: ${{ github.event.pull_request.number }} | ||
| run: | | ||
| set -euo pipefail | ||
| banned='claude-session:|claude\.ai/code|co-authored-by:.*(claude|anthropic|copilot|cursor|grok|gemini|openai|codex|chatgpt|gpt|aider|devin|windsurf|deepseek|qwen|kimi)|generated (with|by) .*(claude|ai\b)|🤖' |
There was a problem hiding this comment.
P2: The new devin, kimi and gpt alternatives match human names as well as AI tools. A commit with Co-authored-by: Devin Smith <...> now fails the check. Drop these bare tokens, or anchor them to an email or a tool-specific form.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At .github/workflows/no-ai-lines.yml, line 29:
<comment>The new `devin`, `kimi` and `gpt` alternatives match human names as well as AI tools. A commit with `Co-authored-by: Devin Smith <...>` now fails the check. Drop these bare tokens, or anchor them to an email or a tool-specific form.</comment>
<file context>
@@ -25,17 +26,22 @@ jobs:
run: |
set -euo pipefail
- banned='claude-session:|claude\.ai/code|co-authored-by:.*(claude|anthropic|copilot|cursor|grok|gemini|openai|codex)|generated (with|by) .*(claude|ai\b)|🤖'
+ banned='claude-session:|claude\.ai/code|co-authored-by:.*(claude|anthropic|copilot|cursor|grok|gemini|openai|codex|chatgpt|gpt|aider|devin|windsurf|deepseek|qwen|kimi)|generated (with|by) .*(claude|ai\b)|🤖'
fail=0
check() {
</file context>
| banned='claude-session:|claude\.ai/code|co-authored-by:.*(claude|anthropic|copilot|cursor|grok|gemini|openai|codex|chatgpt|gpt|aider|devin|windsurf|deepseek|qwen|kimi)|generated (with|by) .*(claude|ai\b)|🤖' | |
| banned='claude-session:|claude\.ai/code|co-authored-by:.*(claude|anthropic|copilot|cursor|grok|gemini|openai|codex|chatgpt|aider|windsurf|deepseek|qwen)|generated (with|by) .*(claude|ai\b)|🤖' |
Fails a pull request or a push to the default branch that carries AI session links or AI co-author lines.