Sage-Bionetworks / sage-monorepo

Where OpenChallenges, Schematic, and other Sage open source apps are built
https://sage-bionetworks.github.io/sage-monorepo/
Apache License 2.0
21 stars 12 forks source link

[Bug] The CI workflow should define the Base SHA from the `main` branch of the official monorepo #2537

Closed tschaffter closed 4 months ago

tschaffter commented 4 months ago

Is there an existing issue for this?

What product(s) are you seeing the problem on?

Sage Monorepo

Current behavior

This tickets originates from these two comments:

See also this Nx docs page that mentions a command to run after nrwl/nx-set-shas@v4. The GH repo for this Action does not mention this comment for v4.

This article describes the behavior of nx affected (2021) with an illustration for when working on a feature branch.

Expected behavior

No response

Anything else?

No response

Commit ID

No response

Are you developing inside the dev container?

Code of Conduct

tschaffter commented 4 months ago
vscode@codespaces-e199be:/workspaces/sage-monorepo$ git remote add upstream https://github.com/Sage-Bionetworks/sage-monorepo.git
vscode@codespaces-e199be:/workspaces/sage-monorepo$ git remote -v
origin  https://github.com/Sage-Bionetworks/sage-monorepo (fetch)
origin  https://github.com/Sage-Bionetworks/sage-monorepo (push)
upstream        https://github.com/Sage-Bionetworks/sage-monorepo.git (fetch)
upstream        https://github.com/Sage-Bionetworks/sage-monorepo.git (push)
vscode@codespaces-e199be:/workspaces/sage-monorepo$ git branch -a
* main
  remotes/origin/HEAD -> origin/main
  remotes/origin/gh-pages
  remotes/origin/main

Running the suggested command:

git branch --track main upstream/main

would only work in the context of a PR that checkout only the feature branch (where no branch named main exists).