Skip to content

nested workflows: a self-call by the repository's old canonical name is read as another repository #556

Open

Description

@thomasboni

Context

#549 resolves cross-repository reusable workflows into nested jobs. A job-level uses: that names the scanned repository itself is recognised as local when its owner/repo matches the scan's projectPath (case-insensitively) or an entry of the new nestedScope.aliases set, which nothing fills today.

Gap

A repository renamed or transferred on GitHub whose workflow still calls itself by the OLD canonical name (uses: oldorg/oldrepo/.github/workflows/reusable.yml@v1) is not recognised as the repository's own: the old name is not projectPath, so the call is treated as another repository and read from the network (GitHub redirects the old name). The API-canonical full name is only learned after the walk, in applyGitHubVisibility (control/task_github.go).

Found by the review bot on #549 (thread on github/nested_workflows.go). The case-variant self-call and a nested job calling back into the scanned repository are handled on #549; only the renamed-repository shape remains.

Expected

Learn the repository's canonical full name (and the names GitHub redirects from, when the API exposes them) BEFORE the nested walk and pass them as aliases, so a self-call by any of those names is local: never fetched, never appended a second time, never counted as the run's first remote read. This changes the signature of ScanGitHubWorkflowsWithProgress (about 20 callers), which is why it is not in #549.

Test

A caller neworg/newrepo whose job uses oldorg/oldrepo/.github/workflows/reusable.yml@v1 with reusable.yml in the checkout yields no duplicated job and no api_disabled cause when the remote read of the self-call fails.

Activity

  1. added theissue type on Oct 17, 2026
  2. changed the issue type fromtoon Oct 17, 2026
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

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions