Skip to content

docs: Add fork support reference page#18537

Merged
pelikhan merged 5 commits intomainfrom
copilot/add-fork-support-documentation-again
Feb 26, 2026
Merged

docs: Add fork support reference page#18537
pelikhan merged 5 commits intomainfrom
copilot/add-fork-support-documentation-again

Conversation

Copy link
Contributor

Copilot AI commented Feb 26, 2026

No documentation existed explaining how gh-aw behaves in forked repositories. Per the actual implementation, running workflows inside a fork is not supported — all jobs skip via the !github.event.repository.fork condition injected at compile time.

Changes

  • docs/src/content/docs/reference/fork-support.md (new): Covers two distinct fork scenarios:
    • Running in a fork — not supported, jobs are skipped gracefully
    • Inbound PRs from forks — blocked by default; use forks: frontmatter to allow trusted forks with glob patterns ("owner/*", "owner/repo", "*")
    • Compatibility table, security warning for broad allowlists, and known limitations
  • docs/astro.config.mjs: Adds "Fork Support" entry at the bottom of the Reference sidebar section
---
on:
  pull_request:
    types: [opened, synchronize]
    forks:
      - "trusted-org/*"
      - "partner/specific-fork"
---
Original prompt

This section details on the original issue you should resolve

<issue_title>[plan] Add fork support documentation page</issue_title>
<issue_description>## Context

Closes part of #18481 — gh-aw in forks.

There is currently no documentation explaining how gh-aw behaves in forked repositories, what works, what doesn't, and how to set things up correctly.

Objective

Add a documentation page on fork support under docs/ covering the compatibility matrix, required setup steps for fork users, and explanation of design decisions.

Approach

  1. Create a new documentation page, e.g., docs/src/content/docs/guides/fork-support.md (follow the existing Diátaxis/Starlight conventions used in docs/).

  2. The page should include:

    • Overview: two fork scenarios (inbound fork PRs vs. running gh-aw in a fork)

    • Compatibility table (based on the scout report):

      Feature Status in Fork Notes
      pull_request fork filtering ✅ Works Compiler injects repo ID check
      workflow_run cross-fork safety ✅ Works Fork check injected at compile time
      Running your own workflows ⚠️ Partial Must configure own secrets
      Agentic maintenance ⚠️ Skipped Fork detection added; skips gracefully
      Slash commands ⚠️ Partial Works if secrets configured
      Secrets ❌ Not inherited Must reconfigure in fork settings
    • Setup guide: step-by-step for configuring required secrets in a fork

    • forks: frontmatter field: explanation of allow-listing trusted forks

    • Known limitations: features that won't work regardless of secret setup

  3. Reference the documentation skill (skills/documentation.md) for style/format guidelines.

  4. Verify the page renders correctly in the docs site structure.

Files to Create/Modify

  • docs/src/content/docs/guides/fork-support.md (new)
  • Possibly update docs/src/content/docs/guides/ index or sidebar config

Acceptance Criteria

  • New documentation page exists covering the two fork scenarios
  • Compatibility table present with accurate status
  • Setup guide covers all required secrets
  • forks: frontmatter field documented
  • Page follows existing docs style and Diátaxis conventions
    Related to Using gh-aw in forks of repositories #18481

Generated by Plan Command for issue #18481

  • expires on Feb 28, 2026, 4:18 PM UTC

Comments on the Issue (you are @copilot in this section)

@pelikhan @copilot forks are not supported. Agentic Workflows will try to cancel all actions but they will not run agents.

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Add fork support documentation page docs: Add fork support guide Feb 26, 2026
@pelikhan
Copy link
Contributor

@copilot move guide to the reference section (bottom)

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 26, 2026

@copilot move guide to the reference section (bottom)

Done in 4c7fe52 — moved to docs/src/content/docs/reference/fork-support.md and added at the bottom of the Reference section in the sidebar.

Copilot AI changed the title docs: Add fork support guide docs: Add fork support reference page Feb 26, 2026
Removed compatibility table and known limitations for fork support.
@pelikhan pelikhan marked this pull request as ready for review February 26, 2026 18:03
Copilot AI review requested due to automatic review settings February 26, 2026 18:03
@pelikhan pelikhan merged commit ca57596 into main Feb 26, 2026
1 check passed
@pelikhan pelikhan deleted the copilot/add-fork-support-documentation-again branch February 26, 2026 18:04
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 adds comprehensive documentation on how GitHub Agentic Workflows behaves in forked repositories, addressing a gap in the existing documentation.

Changes:

  • New reference documentation page explaining two fork scenarios: running workflows inside a fork (not supported, jobs skip) and handling inbound PRs from forks (blocked by default, configurable via forks: field)
  • Sidebar navigation updated to include the new "Fork Support" reference page

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
docs/src/content/docs/reference/fork-support.md New reference page documenting fork behavior, including automatic job skipping in forks and forks: frontmatter configuration for trusted fork PRs
docs/astro.config.mjs Adds "Fork Support" entry to Reference section sidebar navigation
Comments suppressed due to low confidence (1)

docs/src/content/docs/reference/fork-support.md:23

  • The note suggests that forking a repository will allow workflows to run because "the workflows will then run in your copy of the repository, which is not a fork from GitHub Actions' perspective." However, this statement may be misleading.

When you fork a repository on GitHub and then fork it again to your own account, GitHub still considers it a fork (the github.event.repository.fork property will be true). The workflows will still be skipped.

The intended meaning appears to be that if you want to use agentic workflows in your own independent project, you should copy the implementation rather than using GitHub's fork feature. Consider clarifying this to avoid confusion, for example: "To run agentic workflows in your own repository, create an independent repository (not a GitHub fork) and configure your own secrets."

> [!NOTE]
> To run agentic workflows in your own repository, fork the upstream repo and configure your own secrets — the workflows will then run in your copy of the repository, which is not a fork from GitHub Actions' perspective.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

[plan] Add fork support documentation page

3 participants