Repository navigation
Add automated gallery content maintenance - #85
Jay Gordon (jaydestro) merged 3 commits into
Conversation
367fadc to
8a7dce3
Compare
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Critical workflow and network-safety issues, plus validation and Markdown-injection issues, remain unresolved.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 3
Open (3)
What changed in this PR
Adds human-gated automated gallery maintenance, content auditing, review workflows, and GitHub Pages deployment modernization.
Changes:
- Adds catalog auditing, discovery, classification, promotion, and rejection handling.
- Adds policies, skills, tests, documentation, and retirement tracking.
- Migrates deployment tooling from Yarn/
gh-pagesto npm and Pages artifacts. - Updates gallery sorting and maintenance workflows.
| File | Summary |
|---|---|
static/retired-templates.json |
Adds retirement ledger. |
src/pages/ShowcaseCardPage.tsx |
Sorts gallery cards newest-first. |
scripts/gallery-audit/test/review-command.test.mjs |
Adds review-command tests. |
scripts/gallery-audit/test/normalize.test.mjs |
Adds normalization tests. |
scripts/gallery-audit/test/fixtures/feed.xml |
Adds feed fixture data. |
scripts/gallery-audit/test/configuration.test.mjs |
Adds configuration tests. |
scripts/gallery-audit/test/audit.test.mjs |
Adds audit tests. |
scripts/gallery-audit/review-command.mjs |
Handles review commands; title Markdown escaping is required. |
scripts/gallery-audit/promotion.mjs |
Promotes candidates; requires safe title rendering and same-host redirect validation. |
scripts/gallery-audit/normalize.mjs |
Normalizes catalog content. |
scripts/gallery-audit/index.mjs |
Provides audit entry point. |
scripts/gallery-audit/core.mjs |
Performs URL and network validation; IPv6 and authorization-boundary fixes are required. |
scripts/gallery-audit/copilot.mjs |
Classifies candidates; localized Learn URL validation is required. |
README.md |
Updates maintenance and validation guidance. |
package.json |
Adds npm scripts and dependencies. |
package-lock.json |
Records dependency lockfile updates. |
docusaurus.config.js |
Removes legacy deployment configuration. |
docs/gallery-content-discovery-and-maintenance-proposal.md |
Documents architecture and implementation. |
docs/content-source-policy.md |
Defines source and retirement policy. |
docs/automated-gallery-maintenance.md |
Documents operation and recovery. |
Contributing.md |
Updates contributor guidance. |
.gitignore |
Ignores generated output and Yarn lockfiles. |
.github/workflows/deploy.yml |
Uses GitHub Pages artifact deployment. |
.github/workflows/audit-gallery-content.yml |
Adds scheduled auditing; secret conditional handling requires correction. |
.github/workflows/apply-gallery-review.yml |
Applies rejection commands; temporary script copying omits required dependencies. |
.github/skills/humanizer/SKILL.md |
Adds humanizer guidance. |
.github/skills/code-review/SKILL.md |
Adds review guidance. |
.github/gallery-audit/sources.json |
Defines approved sources. |
.github/gallery-audit/relevance-prompt.md |
Defines classification rubric. |
.github/gallery-audit/policy.json |
Defines audit and discovery policy. |
.github/agents/gallery-curator.agent.md |
Defines the constrained curator agent. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
8a7dce3 to
c9f5473
Compare
|
Sajeetharan (@sajeetharan) The Copilot review findings have been addressed and all threads are resolved. The current head passes 62 tests, fixture validation, the production build, YAML lint, and upstream CI. Please review, approve, and merge when ready. I will handle the required token setup after merge and reach out if I need organization-owner assistance. |
Sajeetharan (sajeetharan)
left a comment
There was a problem hiding this comment.
The overall direction looks good. However, I’m requesting changes because a few safeguards need to be addressed before this is enabled:
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Unresolved critical and moderate findings affect redirect safety, catalog promotion, review parsing, workflow permissions, validation, and product-scope consistency.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 4
Open (9)
Prevent unapproved redirect destinations from catalog promotion · New Require same-resource validation before promoting redirects · New Safely encode candidate data in review command markup · New Escape regenerated proposal metadata to prevent injection · New Grant permission to query collaborator authorization · New Make rerun branch names unique or handle existing PRs · New Check retired entries for URL conflicts · New Normalize redirected URLs before catalog updates · New Validate both catalogs before writing promotion results · New
|
Sajeetharan (@sajeetharan) Your five requested safeguards have been addressed in A follow-up GitHub Copilot code review was run against those changes. All nine additional findings from that review were addressed in This should now be ready to go. Please review the latest changes and approve for merge when satisfied. I do not have write permissions to main. I also will have to set up tokens in GitHub actions. |


Summary
Adds production-ready, human-gated gallery maintenance for
AzureCosmosDB/gallerywhile keeping the site fully static:cosmosdb-best-practicesskill and the repositoryhumanizerskillmain; automation never merges or pushes tomainReject: A1, U1, R1maintainer comments and revalidates each revised proposaljagord_microsoftonly when a new maintenance PR is createdfeaturedmetadata/en-us/in live and retired catalog recordsgh-pagespublication to npm and official GitHub Pages artifact deploymentDocumentation
Required after merge
1. Create
COPILOT_GITHUB_TOKENUse a maintained automation identity with an active GitHub Copilot subscription and permission to use Copilot CLI.
AzureCosmosDB.2. Create
GALLERY_UPDATE_TOKENUse a maintained automation identity that is a member of
AzureCosmosDBand can create branches and pull requests in this repository.pending, an organization owner must approve it before the workflow can publish.These must be separate tokens: Copilot Requests is a personal-account permission, while repository write access is organization-scoped.
3. Install the Actions secrets
In AzureCosmosDB/gallery > Settings > Secrets and variables > Actions > Secrets, add both values with these exact names:
COPILOT_GITHUB_TOKENGALLERY_UPDATE_TOKENAlternatively, use commands that prompt for each value without placing it in shell history:
Never paste token values into issues, pull requests, workflow inputs, command arguments, or logs.
4. Configure notification delivery
The workflow requests
jagord_microsoftas reviewer only when it creates a new maintenance PR. In that account:jagord@microsoft.comunder Settings > Emails.AzureCosmosDBorganization notifications tojagord@microsoft.com.jagord_microsoftunder Reviewers and that the email arrives.No SMTP or mail-service secret is required.
5. Enable and verify workflows
gh-pagesto GitHub Actions.complete, both required skills pass preflight, and an eligible proposal can create or update the draft PR.maindeployshttps://azurecosmosdb.github.io/gallery/through Deploy to GitHub Pages.Validation
npm cinpm run test:gallery-audit(62 passed)npm run gallery:audit:fixturesnpm run buildjaydestroorjaydestro.github.ioreferences in automation, scripts, or documentationstatic/templates.json;static/retired-templates.jsonis introduced as an empty infrastructure ledgermain