Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
dominykas opened this issue Sep 29, 2021 · 0 comments
Open
Labels
bug Something isn't working

Comments

@dominykas
Copy link
Member

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
@dominykas dominykas added the bug Something isn't working label Sep 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant