Skip to content

Address Copilot PR #1 feedback + document required OAuth scopes#2

Merged
rparundekar merged 2 commits into
mainfrom
fix/copilot-pr1-feedback
Jun 30, 2026
Merged

Address Copilot PR #1 feedback + document required OAuth scopes#2
rparundekar merged 2 commits into
mainfrom
fix/copilot-pr1-feedback

Conversation

@rparundekar

@rparundekar rparundekar commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

PR #1 merged before its Copilot review comments were addressed. This follow-up applies all 11 of Copilot's inline findings, and additionally documents the OAuth scopes the ops skills require.

Changesets

Convention — quote argument-hint (8 files)
Copilot flagged argument-hint written as a bare YAML flow sequence ([...]), which violates the repo convention (CONTRIBUTING.md) to fully-quote the value so it stays a single scalar string. Single-quoted in:
aaif-announcement-post, aaif-attendee-reminder, aaif-carousel-copy, aaif-dayof-slides, aaif-luma-description, aaif-recap-post, aaif-speaker-bio, aaif-speaker-invite.

Robustness (3 files)

  • skills/aaif-triage-intake/scripts/intake.pyfetch() previously did json.loads(txt[txt.index("{"):]), crashing with an unhelpful ValueError/JSONDecodeError when gws returns a non-JSON banner, empty output, or a different format. Now finds the JSON start safely and exits with a clear message on missing/invalid JSON.
  • skills/aaif-clean-data/scripts/clean.py — the Issues "bad email" rule used ISNUMBER(SEARCH("@", …)), which passes foo@ and foo@bar. Tightened to a REGEXMATCH requiring local@domain.tld.
  • scripts/check_frontmatter.py — read the file via a context manager instead of open(...).read() (avoids ResourceWarning).

Docs — required OAuth scopes (README)
Enabling the Google APIs alone is insufficient: the ops skills write to Sheets/Drive and read Form responses. Documented the read-write scopes (spreadsheets, drive) plus Forms (forms.body, forms.responses.readonly) and added the Forms API to the enable list, with a note that read-only access passes the verify step but fails on the first write.

Test Plan

  • py_compile clean on all 3 scripts
  • check_frontmatter.py parses all 12 SKILL.md blocks (quoted hints load as strings)
  • pre-commit run passes on all changed files (ruff, codespell, gitleaks, frontmatter)

🤖 Generated with Claude Code

- Quote argument-hint as a YAML scalar in 8 SKILL.md files (was a bare
  flow sequence [...], violating CONTRIBUTING.md frontmatter convention)
- intake.py: fail with a clear error on missing/invalid gws JSON instead
  of an unhelpful ValueError/JSONDecodeError stack trace
- clean.py: tighten the Issues "bad email" rule from SEARCH("@") to a
  REGEXMATCH so foo@ / foo@bar are flagged
- check_frontmatter.py: read via a context manager (no ResourceWarning)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 30, 2026 10:56

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Follow-up PR that applies the previously suggested inline fixes from PR #1, focusing on frontmatter/YAML correctness and small robustness improvements in the bundled Python scripts.

Changes:

  • Quote argument-hint in multiple SKILL.md frontmatter blocks so it remains a single YAML scalar string.
  • Make aaif-triage-intake’s gws JSON parsing more defensive with clearer failure messages.
  • Tighten the “bad email” Issues rule in aaif-clean-data and avoid a ResourceWarning in the frontmatter checker.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.

Show a summary per file
File Description
skills/aaif-triage-intake/scripts/intake.py Safer detection/parsing of gws JSON output with clearer error messages on missing/invalid JSON.
skills/aaif-clean-data/scripts/clean.py Strengthens the Google Sheets email validation formula using REGEXMATCH to require a domain + TLD.
scripts/check_frontmatter.py Uses a context manager for file reads to avoid leaking file descriptors.
skills/aaif-announcement-post/SKILL.md Quotes argument-hint to enforce valid YAML frontmatter.
skills/aaif-attendee-reminder/SKILL.md Quotes argument-hint to enforce valid YAML frontmatter.
skills/aaif-carousel-copy/SKILL.md Quotes argument-hint to enforce valid YAML frontmatter.
skills/aaif-dayof-slides/SKILL.md Quotes argument-hint to enforce valid YAML frontmatter.
skills/aaif-luma-description/SKILL.md Quotes argument-hint to enforce valid YAML frontmatter.
skills/aaif-recap-post/SKILL.md Quotes argument-hint to enforce valid YAML frontmatter.
skills/aaif-speaker-bio/SKILL.md Quotes argument-hint to enforce valid YAML frontmatter.
skills/aaif-speaker-invite/SKILL.md Quotes argument-hint to enforce valid YAML frontmatter.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

…EADME

Enabling the APIs is not enough — the ops skills write to Sheets/Drive and
read Form responses, so the token needs read-write scopes. Read-only access
passes the verify step but fails on the first write. Add Forms API + the
forms.body / forms.responses.readonly scopes for intake ops.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@rparundekar rparundekar changed the title Address Copilot review feedback from PR #1 Address Copilot PR #1 feedback + document required OAuth scopes Jun 30, 2026
@rparundekar rparundekar merged commit c2704f6 into main Jun 30, 2026
2 checks passed
@rparundekar rparundekar deleted the fix/copilot-pr1-feedback branch June 30, 2026 11:32
@rparundekar rparundekar restored the fix/copilot-pr1-feedback branch June 30, 2026 11:32
@rparundekar rparundekar deleted the fix/copilot-pr1-feedback branch June 30, 2026 11:33
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

Successfully merging this pull request may close these issues.

2 participants