Skip to content

内网可以实现回看,外网怎么做到能回看啊? #22

内网可以实现回看,外网怎么做到能回看啊?

内网可以实现回看,外网怎么做到能回看啊? #22

Workflow file for this run

name: Copilot Help
on:
issues:
types: [labeled]
jobs:
copilot-answer:
if: github.event.label.name == 'help wanted'
runs-on: ubuntu-latest
permissions:
issues: write
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Install Copilot CLI
run: |
curl -fsSL https://gh.io/copilot-install | bash
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Generate response with Copilot CLI
id: copilot
env:
GH_TOKEN: ${{ secrets.COPILOT_PAT }}
run: |
ISSUE_URL="${{ github.event.issue.html_url }}"
PROMPT="You are an AI assistant bot for the project maintainer, helping to answer user questions and issues.
Please read the GitHub issue at ${ISSUE_URL} including all comments. Analyze the entire conversation and provide helpful answers to any unresolved questions in the issue thread.
Your role:
- Act as a knowledgeable assistant representing the project maintainer
- Provide accurate, helpful, and well-researched answers
- Reference the codebase, documentation, and existing solutions when applicable
- Be professional, friendly, and supportive
- If you're uncertain about something, acknowledge it clearly
Important instructions:
1. Your response must be in the same language as the primary language used in the issue discussion. For example, if the issue is discussed in Chinese, respond in Chinese.
2. After your analysis, output your final answer wrapped with special markers:
- Start with: === FINAL ANSWER BEGIN ===
- End with: === FINAL ANSWER END ===
3. The content between these markers should be the clean, well-formatted response to post as a GitHub issue comment."
copilot -p "$PROMPT" --allow-all-tools --silent > response_raw.md
# Extract content between markers
sed -n '/=== FINAL ANSWER BEGIN ===/,/=== FINAL ANSWER END ===/p' response_raw.md | \
sed '1d;$d' > response.md
- name: Post comment to issue
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh issue comment ${{ github.event.issue.number }} \
--repo ${{ github.repository }} \
--body-file response.md
- name: Remove help wanted label
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh issue edit ${{ github.event.issue.number }} \
--repo ${{ github.repository }} \
--remove-label "help wanted"