-
Notifications
You must be signed in to change notification settings - Fork 4
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
Get default branch from deployment event #18
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
description: "The main branch of this repository" | ||
default: "main" | ||
description: "The branch to compare against when finding new links to check" | ||
default: "${{ github.event.repository.default_branch }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
surprised that this is accessible from on.workflow_call.inputs.<inputs_id>.default
but according to https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability this should actually work fine :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was skeptical at first as well and was ready to just axe the option, but I made sure to test this out first and it surprisingly went just fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
…tect-diff-branch-in-action
This PR utilizes the
default_branch
given to us by GitHub to populate thebranch
(previouslymain
) field when getting diffs.The ability to override the branch is kept because it was easy and could be useful in some cases, but in most cases users won't need it.
Test branch at iterative/cml.dev#287