amtoine / nu-git-manager

A collection of Nushell tools to manage Git repositories.
GNU General Public License v3.0
26 stars 2 forks source link

use `github.base_ref` to get the target branch in the CI #139

Closed amtoine closed 9 months ago

amtoine commented 9 months ago

github.ref would give something like refs/pull/xxx/merge whereas github.base_ref would give nightly or main depending on the target branch.

see the doc

GITHUB_BASE_REF The name of the base ref or target branch of the pull request in a workflow run. This is only set when the event that triggers a workflow run is either pull_request or pull_request_target. For example, main.