Copilot/weekly workflow editor checks#17585
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot update prompt to scan the editors for the list of editors to inspect. |
There was a problem hiding this comment.
Pull request overview
This PR introduces a new automated workflow for weekly health checks of workflow editors listed in the documentation. The workflow validates editor URLs, captures Playwright screenshots, and creates a pull request with updated preview images.
Changes:
- Adds a workflow definition file describing the health check process, editor URLs to monitor, and step-by-step instructions for the agent
- Adds the compiled GitHub Actions workflow file that implements the defined behavior with proper job orchestration, MCP server configuration, and safe output handling
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
| .github/workflows/weekly-editors-health-check.md | Workflow definition with frontmatter configuration, editor URLs, and detailed instructions for URL checking, screenshot capture, and PR creation |
| .github/workflows/weekly-editors-health-check.lock.yml | Compiled GitHub Actions workflow with job definitions, agent execution, threat detection, and asset upload capabilities |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| For each URL in the table above, verify that the page is reachable: | ||
|
|
||
| 1. Use `web_fetch` (or `curl -sS -o /dev/null -w "%{http_code}" <url>`) to perform an HTTP GET request. |
There was a problem hiding this comment.
The instructions mention using web_fetch or curl to check URLs, but curl is listed in the bash tools allowlist while web_fetch is listed separately under the web-fetch tool section. The instruction should clarify which tool to use, or confirm both are available and either can be used interchangeably.
| 1. Use `web_fetch` (or `curl -sS -o /dev/null -w "%{http_code}" <url>`) to perform an HTTP GET request. | |
| 1. Use the `web-fetch` tool to perform an HTTP GET request. Alternatively, you may use the bash tool with `curl -sS -o /dev/null -w "%{http_code}" <url>` to check the URL. |
| For each editor URL that responded with HTTP 200 in Step 1: | ||
|
|
||
| 1. Use the Playwright MCP tool to navigate to the URL. | ||
| 2. Wait for the page to fully load (wait for network idle). |
There was a problem hiding this comment.
The instruction says to "wait for network idle" when using Playwright, but doesn't specify a timeout or what constitutes "idle." This could lead to indefinite waiting or inconsistent behavior. Consider specifying a concrete wait strategy, such as "wait for network idle state with a 30 second timeout" or similar.
| 2. Wait for the page to fully load (wait for network idle). | |
| 2. Wait for the page to finish loading by waiting for a network-idle state with a maximum wait of 30 seconds (for example, using a `networkidle` wait option with a 30s timeout). |
|
|
||
| 1. Use the Playwright MCP tool to navigate to the URL. | ||
| 2. Wait for the page to fully load (wait for network idle). | ||
| 3. Take a full-page screenshot and save it to `/tmp/gh-aw/editors/<editor-id>-screenshot.png` where `<editor-id>` is one of: |
There was a problem hiding this comment.
The instruction to save screenshots to /tmp/gh-aw/editors/<editor-id>-screenshot.png references a directory that may not exist. The workflow should ensure this directory is created before attempting to save screenshots to avoid file system errors.
| 3. Take a full-page screenshot and save it to `/tmp/gh-aw/editors/<editor-id>-screenshot.png` where `<editor-id>` is one of: | |
| 3. Ensure the directory `/tmp/gh-aw/editors` exists before saving any screenshots (for example, by running `mkdir -p /tmp/gh-aw/editors` in a shell step). | |
| 4. Take a full-page screenshot and save it to `/tmp/gh-aw/editors/<editor-id>-screenshot.png` where `<editor-id>` is one of: |
| mkdir -p /tmp/gh-aw/safeoutputs | ||
| mkdir -p /tmp/gh-aw/mcp-logs/safeoutputs | ||
| cat > /opt/gh-aw/safeoutputs/config.json << 'GH_AW_SAFE_OUTPUTS_CONFIG_EOF' | ||
| {"create_pull_request":{"expires":168,"max":1},"missing_data":{},"missing_tool":{},"noop":{"max":1},"upload_asset":{"max":0}} |
There was a problem hiding this comment.
The upload_asset configuration has "max":0 which prevents any assets from being uploaded. This conflicts with the workflow's stated purpose of taking screenshots and uploading them. The max value should be set to at least 3 (one for each editor) or higher to allow the workflow to function as intended.
| {"create_pull_request":{"expires":168,"max":1},"missing_data":{},"missing_tool":{},"noop":{"max":1},"upload_asset":{"max":0}} | |
| {"create_pull_request":{"expires":168,"max":1},"missing_data":{},"missing_tool":{},"noop":{"max":1},"upload_asset":{"max":3}} |
| name: Weekly Editors Health Check | ||
| description: Checks that the workflow editors listed in the documentation are still valid, takes Playwright screenshots, and opens a PR to update the docs with preview images | ||
| on: | ||
| schedule: weekly |
There was a problem hiding this comment.
The schedule value "weekly" is not a valid YAML syntax for GitHub Actions workflows. The schedule trigger requires a cron expression format. For example, use cron: "0 0 * * 0" for weekly runs on Sundays at midnight, or specify the actual cron expression that should be used.
| schedule: weekly | |
| schedule: | |
| - cron: '0 0 * * 0' |
| bash: | ||
| - "curl*" | ||
| - "cat*" | ||
| edit: |
There was a problem hiding this comment.
The edit tool is listed in the tools section but without any configuration or allowed patterns. This is inconsistent with other tool definitions like bash which has specific allowed commands. Either add configuration for the edit tool or verify that this empty configuration is intentional and sufficient for the workflow's needs.
| edit: | |
| edit: | |
| - ".github/workflows/**" | |
| - "docs/**" |
| edit: | ||
|
|
||
| safe-outputs: | ||
| upload-asset: |
There was a problem hiding this comment.
The upload-asset safe output is listed without a max constraint, while the compiled .lock.yml file shows "max":0 in line 402. This means no assets can be uploaded, which contradicts the workflow's purpose of uploading screenshot assets. The configuration should specify an appropriate maximum number of assets (e.g., max: 3 for the three editors being checked).
| upload-asset: | |
| upload-asset: | |
| max: 3 |
…17586) * Initial plan * feat: update weekly editors health check to scan editors.mdx for editor list Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot update_asset max should be 5 |
|
@copilot firewall allow *.github.io *.github.com |
* Initial plan * Add *.github.io and *.github.com to network firewall allowlist Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
* Initial plan * Set upload-asset max to 5 in weekly-editors-health-check workflow Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> Co-authored-by: Peli de Halleux <pelikhan@users.noreply.github.com>
No description provided.