Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

is it redudant to run Copilot Setup Steps on `push` and `pull_request`?

Đã đóng Phù hợp với người mới
#42,379 9 bình luận 2 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
75/100
Loại issue
Tài liệu
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
github-actions
Lĩnh vực
documentation

Hướng nghiên cứu

Bắt đầu với bài viết tài liệu Copilot bị ảnh hưởng và ví dụ copilot-setup-steps.yml của bài viết đó. Xem lại các trigger push và pull_request được ghi trong tài liệu cùng với quan sát về Check Run của issue; được xem là hoàn tất khi mẫu và phần hướng dẫn xung quanh phản ánh rõ cấu hình trigger dự kiến, đồng thời các bước kiểm tra tài liệu đều đạt.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

content copilot never-stale
Code of Conduct
What article on docs.github.com is affected?

https://docs.github.com/en/copilot/how-tos/use-copilot-agents/coding-agent/customize-the-agent-environment#preinstalling-tools-or-dependencies-in-copilots-environment

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 on push the commit in the pull_request will already have a Check Run associated with it from the push workflow trigger, so pull_request workflow trigger seems redundant in the sample workflow below.

ex.
Image

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

Ngôn ngữ chính
TypeScript
Star
20.9k
Fork
68.8k
Merge trung bình
12 giờ 41 phút
Pull request đã merge (30 ngày)
120

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của github/docs

Tất cả issue của github/docs

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.