Skip to content

Copilot/fix 44d8dbc1 3c4c 419a 88cf 09f76737c02b#2196

Closed
kalosha959-wq wants to merge 4 commits intogithub:mainfrom
kalosha959-wq:copilot/fix-44d8dbc1-3c4c-419a-88cf-09f76737c02b
Closed

Copilot/fix 44d8dbc1 3c4c 419a 88cf 09f76737c02b#2196
kalosha959-wq wants to merge 4 commits intogithub:mainfrom
kalosha959-wq:copilot/fix-44d8dbc1-3c4c-419a-88cf-09f76737c02b

Conversation

@kalosha959-wq
Copy link

Summary

Why

Fixes #

What changed

MCP impact

  • No tool or API changes
  • Tool schema or behavior changed
  • New tool added

Prompts tested (tool changes only)

Security / limits

  • No security or limits impact
  • Auth / permissions considered
  • Data exposure, filtering, or token/size limits considered

Tool renaming

  • I am renaming tools as part of this PR (e.g. a part of a consolidation effort)
    • I have added the new tool aliases in deprecated_tool_aliases.go
  • I am not renaming tools as part of this PR

Note: 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

  • Linted locally with ./script/lint
  • Tested locally with ./script/test

Docs

  • Not needed
  • Updated (README / docs / examples)

Copilot AI and others added 4 commits August 2, 2025 23:36
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.
@kalosha959-wq kalosha959-wq requested a review from a team as a code owner March 11, 2026 05:48
Copilot AI review requested due to automatic review settings March 11, 2026 05:48
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 *.html content.
  • 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.

Comment on lines +20 to +21
**[🚀 Launch AI Story Studio Demo](https://kalosha959-wq.github.io/github-mcp-server/ai-story-studio-combined.html)**

Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
**[🚀 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`.

Copilot uses AI. Check for mistakes.
Comment on lines +9 to +13
pull_request:
branches: [ main, master ]
paths:
- '*.html'
- '.github/workflows/pages.yml'
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
EOF

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
uses: actions/upload-pages-artifact@v3
uses: actions/upload-pages-artifact@v3
with:
path: ./_site

Copilot uses AI. Check for mistakes.
const story = generateDemoStory(genre, characters, setting, prompt);

storyOutput.style.display = 'block';
storyOutput.innerHTML = story;
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
storyOutput.innerHTML = story;
storyOutput.textContent = story;

Copilot uses AI. Check for mistakes.
Comment on lines +412 to +416
document.getElementById(tabName).classList.add('active');

// Add active class to clicked tab
event.target.classList.add('active');
}
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
Comment on lines 20 to +26
- 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
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

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

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:.

Copilot uses AI. Check for mistakes.
<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">
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
<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">

Copilot uses AI. Check for mistakes.
Comment on lines +10 to +19
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/`
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
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>/`

Copilot uses AI. Check for mistakes.
Comment on lines +18 to +19
- **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/`
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
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.

4 participants