Copilot/fix 44d8dbc1 3c4c 419a 88cf 09f76737c02b#2196
Copilot/fix 44d8dbc1 3c4c 419a 88cf 09f76737c02b#2196kalosha959-wq wants to merge 4 commits intogithub:mainfrom
Conversation
Co-authored-by: kalosha959-wq <222045069+kalosha959-wq@users.noreply.github.com>
Co-authored-by: kalosha959-wq <222045069+kalosha959-wq@users.noreply.github.com>
Added artifact upload step with configurable options.
There was a problem hiding this comment.
Pull request overview
This PR introduces a static “AI Story Studio” demo to the repository and adds GitHub Pages automation/documentation to publish that demo.
Changes:
- Added a standalone HTML demo page (AI Story Studio) and linked it from the README.
- Added a GitHub Pages workflow to publish
*.htmlcontent. - Added a doc describing how to enable GitHub Pages for the demo.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
docs/github-pages-setup.md |
Adds setup instructions for enabling Pages and accessing the demo. |
ai-story-studio-combined.html |
Adds the static demo UI and client-side behavior. |
README.md |
Adds a new “Demo Applications” section with a link to the demo. |
.github/workflows/pages.yml |
Adds a workflow to build/upload/deploy Pages artifacts. |
.github/workflows/license-check.yml |
Modifies the existing license-check workflow (currently broken by the diff). |
You can also share your feedback on Copilot code review. Take the survey.
| **[🚀 Launch AI Story Studio Demo](https://kalosha959-wq.github.io/github-mcp-server/ai-story-studio-combined.html)** | ||
|
|
There was a problem hiding this comment.
The demo link is hard-coded to kalosha959-wq.github.io, which will be incorrect for the upstream repo and most forks. Use a relative link, or document that users should substitute their own <owner>.github.io/<repo> URL after enabling Pages.
| **[🚀 Launch AI Story Studio Demo](https://kalosha959-wq.github.io/github-mcp-server/ai-story-studio-combined.html)** | |
| **[🚀 Launch AI Story Studio Demo](ai-story-studio-combined.html)** | |
| When published via GitHub Pages, this will be available at `https://<owner>.github.io/<repo>/ai-story-studio-combined.html`. |
| pull_request: | ||
| branches: [ main, master ] | ||
| paths: | ||
| - '*.html' | ||
| - '.github/workflows/pages.yml' |
There was a problem hiding this comment.
This workflow will attempt to deploy Pages on pull_request events. Pages deployments usually require permissions that PR workflows (especially from forks) don't have, leading to failing/noisy runs. Consider limiting deployment to pushes and running only the build job on PRs.
| EOF | ||
|
|
||
| - name: Upload artifact | ||
| uses: actions/upload-pages-artifact@v3 |
There was a problem hiding this comment.
actions/upload-pages-artifact is invoked without specifying which directory to upload. Since this job builds _site/, explicitly set the upload path to _site to avoid accidentally uploading the entire repository and to make the workflow behavior deterministic.
| uses: actions/upload-pages-artifact@v3 | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: ./_site |
| const story = generateDemoStory(genre, characters, setting, prompt); | ||
|
|
||
| storyOutput.style.display = 'block'; | ||
| storyOutput.innerHTML = story; |
There was a problem hiding this comment.
This writes user-provided content (prompt/characters/setting) into the DOM via innerHTML, which allows DOM-based XSS if someone enters HTML/JS into the form. Use textContent (or otherwise escape/sanitize) when rendering the generated story.
| storyOutput.innerHTML = story; | |
| storyOutput.textContent = story; |
| document.getElementById(tabName).classList.add('active'); | ||
|
|
||
| // Add active class to clicked tab | ||
| event.target.classList.add('active'); | ||
| } |
There was a problem hiding this comment.
switchTab uses event.target, but event here is an implicit global from the inline handler and isn't reliable across browsers. Pass the event explicitly (or switch to addEventListener) so tab switching doesn't break.
| - name: check licenses | ||
| run: ./script/licenses-check | ||
| - name: Upload a Build Artifact | ||
| uses: actions/upload-artifact@v7.0.0 | ||
| with: | ||
| # Artifact name. If the `archive` input is `false`, the name of the file uploaded will be the artifact name. | ||
| name: # optional, default is artifact |
There was a problem hiding this comment.
The lines added here make this workflow invalid YAML (a mis-indented - name: under run:), which will break CI. Remove the artifact-upload block or re-add it as a properly indented step under steps:.
| <header> | ||
| <h1>🤖 AI Story Studio</h1> | ||
| <p class="subtitle">A demo application showcasing GitHub MCP Server capabilities</p> | ||
| <a href="https://github.com/github/github-mcp-server" class="github-link" target="_blank"> |
There was a problem hiding this comment.
Links opened with target="_blank" should include rel="noopener noreferrer" to prevent reverse-tabnabbing and to avoid giving the new page access to window.opener.
| <a href="https://github.com/github/github-mcp-server" class="github-link" target="_blank"> | |
| <a href="https://github.com/github/github-mcp-server" class="github-link" target="_blank" rel="noopener noreferrer"> |
| 1. Go to your repository settings: `https://github.com/kalosha959-wq/github-mcp-server/settings` | ||
| 2. Scroll down to the "Pages" section in the left sidebar | ||
| 3. Under "Source", select "GitHub Actions" | ||
| 4. The workflow in `.github/workflows/pages.yml` will automatically deploy the site | ||
|
|
||
| ### Step 2: Access Your Demo | ||
| Once GitHub Pages is enabled and the workflow runs successfully, your AI Story Studio demo will be available at: | ||
|
|
||
| - **Main Demo**: `https://kalosha959-wq.github.io/github-mcp-server/ai-story-studio-combined.html` | ||
| - **Index Page**: `https://kalosha959-wq.github.io/github-mcp-server/` |
There was a problem hiding this comment.
This doc hard-codes a specific repository settings URL (kalosha959-wq/github-mcp-server). Replace it with a generic instruction (e.g., "Settings → Pages" for the current repo) or use <owner>/<repo> placeholders so it applies to all forks.
| 1. Go to your repository settings: `https://github.com/kalosha959-wq/github-mcp-server/settings` | |
| 2. Scroll down to the "Pages" section in the left sidebar | |
| 3. Under "Source", select "GitHub Actions" | |
| 4. The workflow in `.github/workflows/pages.yml` will automatically deploy the site | |
| ### Step 2: Access Your Demo | |
| Once GitHub Pages is enabled and the workflow runs successfully, your AI Story Studio demo will be available at: | |
| - **Main Demo**: `https://kalosha959-wq.github.io/github-mcp-server/ai-story-studio-combined.html` | |
| - **Index Page**: `https://kalosha959-wq.github.io/github-mcp-server/` | |
| 1. In GitHub, open your repository and navigate to **Settings → Pages** | |
| 2. In the "Build and deployment" section, ensure the "Source" is set to **GitHub Actions** | |
| 3. The workflow in `.github/workflows/pages.yml` will automatically deploy the site | |
| ### Step 2: Access Your Demo | |
| Once GitHub Pages is enabled and the workflow runs successfully, your AI Story Studio demo will be available at URLs based on your GitHub user/organization and repository name: | |
| - **Main Demo**: `https://<github-user-or-org>.github.io/<repo-name>/ai-story-studio-combined.html` | |
| - **Index Page**: `https://<github-user-or-org>.github.io/<repo-name>/` |
| - **Main Demo**: `https://kalosha959-wq.github.io/github-mcp-server/ai-story-studio-combined.html` | ||
| - **Index Page**: `https://kalosha959-wq.github.io/github-mcp-server/` |
There was a problem hiding this comment.
These GitHub Pages URLs are hard-coded to a specific owner (kalosha959-wq). Use a templated <owner>.github.io/<repo> form or explain how to determine the correct URL for the current fork.
Summary
Why
Fixes #
What changed
MCP impact
Prompts tested (tool changes only)
Security / limits
Tool renaming
deprecated_tool_aliases.goNote: if you're renaming tools, you must add the tool aliases. For more information on how to do so, please refer to the official docs.
Lint & tests
./script/lint./script/testDocs