Skip to content

Reference the fork when running from a PR from a forked repository #107

@dominykas

Description

@dominykas

Right now we use the repository URL from package.json to determine the git repository of the parent (dependency) package, and we link the dependents to use a branch from this repository

This is also used to check out a branch based on the branch name of the PR in the workflow.

This behavior is incorrect and fails.

When wiby is running in CI triggered from a PR which based off a fork, we need to:

  • keep using the branch name of the fork (except when it is main, see bullet point in Name wiby test branches based on the dependency branch name #78) for constructing the testing branch name (e.g. wiby-my-feature)
  • reference the PR based branch name from the target (i.e. parent) repo (e.g. pkgjs/wiby#pull/ID/head)
  • use git fetch origin pull/ID/head:BRANCHNAME approach to check out the branch inside the action

When wiby is running locally, we need to:

  • keep using the branch name of the fork
  • reference the branch name and repository of the origin

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions