Skip to content

pull_request workflow added in a PR from a fork doesn't run until it exists on the default branch #46340

Closed

Description

@anton-tamr

Code of Conduct

What article on docs.github.com is affected?

https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#pull_request

What part(s) of the article would you like to see updated?

This is a follow-up to #39364, which was closed as inactive after the team couldn't reproduce it. Here is a public reproduction.

When a pull request from a fork adds a new pull_request workflow, and the base repository's default branch has no workflow file yet, no workflow run is ever created in the base repository. The run only starts once the workflow file is on the default branch. In our case this only happened for the PR from a fork. The same branch opened as a PR inside the fork ran the workflow every time.

Repository: Datatamer/terraform-aws-privatelink-consumer (public). Actions is enabled with all actions allowed. The PR author is an org member with admin on the repo, so no fork approval applies, and no runs were waiting for approval.

  1. MAJOR: CLOUD-19579 publish the PrivateLink consumer module Datatamer/terraform-aws-privatelink-consumer#1 was opened from the fork anton-tamr/terraform-aws-privatelink-consumer. It adds .github/workflows/make.yml with on: pull_request. The default branch master had no workflows. The PR was reopened and got several pushes, including a force-push. The base repo created no workflow run and no check suite for any of them. The Actions tab showed "No workflows found" and "0 workflow runs".
  2. Control: the same branch opened as a PR inside the fork, against the fork's master, which also had no workflow, ran the workflow on every push: MAJOR: CLOUD-19579 publish the PrivateLink consumer module anton-tamr/terraform-aws-privatelink-consumer#1
  3. FIX: add the make workflow Datatamer/terraform-aws-privatelink-consumer#2 added only the same make.yml to master and was merged.
  4. After rebasing #1 onto the new master and pushing, the base repo ran the workflow right away: https://github.com/Datatamer/terraform-aws-privatelink-consumer/actions/runs/38811473529

Expected: either the workflow runs for the fork PR, as the article implies by not listing a default-branch requirement for pull_request, or the article states that the workflow file must exist on the default branch for PRs from forks.

Additional information

The first commit of #1 had a YAML syntax error in the workflow. It was fixed in later pushes, and the branch was then squashed so that commit was no longer in the PR. The base repo still created no run until the file was on master.

Activity

  1. added
    triageDo not begin working on this issue until triaged by the team
    on Oct 15, 2026
  2. subatoi commented on Oct 16, 2026

    @subatoi
    Contributor

    @anton-tamr Thanks for reporting. As noted in the original issue, if this behaviour is genuine, then it's a bug. As such, you'd need to either raise this as a community discussion, or, if your plan includes it, raise a Support ticket with details. We can't verify bugs in this repository and we wouldn't be able to follow up here, but I'll mark this issue as fix-internally to trigger a workflow to transfer it internally so there's a record of a potential documentation gap. Thank you

  3. added
    fix-internallyTriggers a workflow to copy the issue internally and close the current issue
    on Oct 16, 2026
  4. docs-bot commented on Oct 16, 2026

    @docs-bot
    Collaborator

    Thank you for opening this issue! Updates to this documentation must be made internally. I have copied your issue to an internal issue, so I will close this issue.

  5. anton-tamr commented on Oct 16, 2026

    @anton-tamr
    Author

    the original issue was closed in 2025. and at that time @Sharra-writes requested steps to reproduce. I'm providing steps to reproduce.

    this behavior needs to be documented well before the official fix lands. people are wasting tens of thousands of hours worldwide because the behavior isn't documented. I wasted a lot of time and only the original issue helped me to understand how to fix it. you can make it easier for others by simply adding one sentence to the doc. you can revert the doc changes after the fix was made (which can be months or years from now)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    fix-internallyTriggers a workflow to copy the issue internally and close the current issuetriageDo not begin working on this issue until triaged by the team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions