Open
Description
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
- detect if the branch has an upstream set? see also: last bullet point in Edge case handling #46