is it redudant to run Copilot Setup Steps on `push` and `pull_request`?
還沒有人認領這個 Issue。
評估
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 新手友好度
- 75/100
- Issue 類型
- 文件
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- github-actions
研究方向
從受影響的 Copilot 文件文章及其 copilot-setup-steps.yml 範例開始。檢視文件中記載的 push 和 pull_request 觸發程序,以及 issue 中對 Check Run 的觀察結果;當範例和周圍的指引清楚反映預期的觸發程序設定,且文件檢查通過時,即表示完成。
由索引模型根據 Issue 內容生成。
描述
Code of Conduct
- I have read and agree to the GitHub Docs project's Code of Conduct
What article on docs.github.com is affected?
What part(s) of the article would you like to see updated?
I don't think it should be suggested to have both push and pull_request as workflow triggers in the sample copilot-setup-steps.yml.
[!note]
If you run onpushthe commit in thepull_requestwill already have a Check Run associated with it from thepushworkflow trigger, sopull_requestworkflow trigger seems redundant in the sample workflow below.
ex.
name: "Copilot Setup Steps"
# Automatically run the setup steps when they are changed to allow for easy validation, and
# allow manual testing through the repository's "Actions" tab
on:
workflow_dispatch:
push:
paths:
- .github/workflows/copilot-setup-steps.yml
pull_request:
paths:
- .github/workflows/copilot-setup-steps.yml
jobs:
# The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot.
copilot-setup-steps:
runs-on: ubuntu-latest
# Set the permissions to the lowest permissions possible needed for your steps.
# Copilot will be given its own token for its operations.
permissions:
# If you want to clone the repository as part of your setup steps, for example to install dependencies, you'll need the `contents: read` permission. If you don't clone the repository in your setup steps, Copilot will do this for you automatically after the steps complete.
contents: read
# You can define any steps you want, and they will run before the agent starts.
# If you do not check out your code, Copilot will do this for you.
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
- name: Install JavaScript dependencies
run: npm ci
Additional information
No response
- 主要語言
- TypeScript
- 星號
- 20.9k
- 分支
- 68.8k
- 平均合併
- 12 小時 41 分鐘
- 30 天內合併 PR
- 120
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
github/docs 的其他 Issue
-
triage
難度 1/5 1 小時以內 新手友好度 95/100
-
content
難度 1/5 1 小時以內 新手友好度 85/100
-
localization
難度 2/5 1-2 天 新手友好度 72/100
-
content localization
難度 2/5 1-3 小時 新手友好度 78/100
-
content localization
難度 1/5 1 小時以內 新手友好度 92/100
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 84/100
bcgov/bc-wallet-mobile#4761 · 1 則留言 ·
-
external-issue to-triage
難度 2/5 1-3 小時 新手友好度 88/100
-
area-deployment area-integrations triage:bot-seen
難度 2/5 半天 新手友好度 86/100
-
難度 2/5 1-3 小時 新手友好度 82/100
-
refactor
難度 2/5 1-3 小時 新手友好度 84/100