Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

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

Geschlossen Anfängerfreundlich
#42,379 9 Kommentare 2 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Anfängerfreundlichkeit
75/100
Issue-Typ
Dokumentation
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
github-actions
Bereich
documentation

Rechercherichtung

Beginne mit dem betroffenen Copilot-Dokumentationsartikel und seinem Beispiel für copilot-setup-steps.yml. Überprüfe die dokumentierten push- und pull_request-Trigger sowie die Check-Run-Beobachtung aus dem Issue; abgeschlossen ist die Arbeit, wenn das Beispiel und die umgebenden Hinweise die beabsichtigte Trigger-Konfiguration eindeutig widerspiegeln und die Dokumentationsprüfungen erfolgreich sind.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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

Vorherrschende Sprache
TypeScript
Sterne
20.9k
Forks
68.8k
Ø Merge
12 Std. 41 Min.
Gemergte PRs (30 T.)
120

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus github/docs

Alle Issues in github/docs

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.