Skip to content

Conversation

@YanxuanLiu
Copy link
Collaborator

@YanxuanLiu YanxuanLiu commented Jun 6, 2025

fix #37

Add v2 for new branch strategy. Allow to check main branch

test run: https://github.com/YanxuanLiu/spark-rapids/actions/runs/15484134743/job/43595238006?pr=31

Signed-off-by: Yanxuan Liu <[email protected]>
@YanxuanLiu YanxuanLiu requested a review from a team as a code owner June 6, 2025 06:29
@YanxuanLiu YanxuanLiu self-assigned this Jun 6, 2025
@YanxuanLiu YanxuanLiu requested review from NvTimLiu, pxLi and yinqingh June 6, 2025 06:29
Copy link
Member

@pxLi pxLi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just a quick skim. Lets mark this as draft for now, we will get back to this in July to see if fulfill the latest requirement at that moment, thanks

Please also include update to the common repo directly in this change, as this one is main development based, thanks

@pxLi pxLi marked this pull request as draft June 6, 2025 06:33
Signed-off-by: Yanxuan Liu <[email protected]>
Signed-off-by: Yanxuan Liu <[email protected]>
@pxLi
Copy link
Member

pxLi commented Jun 9, 2025

It looks like simply adding a switch to the existing action may be more efficient here as we will always need to change the ref place. So old branches can keep using it with default value, and new release/branch-* will just need to add a param for the action. Thanks

Signed-off-by: Yanxuan Liu <[email protected]>
Signed-off-by: Yanxuan Liu <[email protected]>
Signed-off-by: Yanxuan Liu <[email protected]>
@YanxuanLiu
Copy link
Collaborator Author

YanxuanLiu commented Jun 9, 2025

After discussion offline, added a flag check_main to original action, set its default value as false to avoid any change of old branches.

Test runs:

Signed-off-by: Yanxuan Liu <[email protected]>
@pxLi pxLi requested a review from Copilot June 10, 2025 03:05
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds an optional flag to control whether the license header check runs on PRs targeting the main branch.

  • Introduce a new check_main boolean input (default: false).
  • Update the composite action script to skip or perform the check on the main branch based on check_main.
Comments suppressed due to low confidence (2)

license-header-check/action.yml:26

  • The new check_main input isn't documented in the action's README or usage examples. Please update the documentation to include its purpose, default value, and usage.
check_main:

license-header-check/action.yml:45

  • Consider adding or updating test cases to cover the scenario when check_main is true, ensuring that license header checks run on PRs targeting the main branch.
if [[ "${{ inputs.check_main }}" == "false" ]]; then

Comment on lines 45 to 49
if [[ "${{ inputs.check_main }}" == "false" ]]; then
if [[ "${{ github.event.pull_request.base.ref }}" == "main" ]]; then
echo "Skip this check for Merge to main PR."
exit 0
fi
Copy link

Copilot AI Jun 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The nested if blocks around check_main can be simplified into a single conditional to improve readability, for example: if [[ "${{ inputs.check_main }}" == "false" && "${{ github.event.pull_request.base.ref }}" == "main" ]]; then ... fi.

Suggested change
if [[ "${{ inputs.check_main }}" == "false" ]]; then
if [[ "${{ github.event.pull_request.base.ref }}" == "main" ]]; then
echo "Skip this check for Merge to main PR."
exit 0
fi
if [[ "${{ inputs.check_main }}" == "false" && "${{ github.event.pull_request.base.ref }}" == "main" ]]; then
echo "Skip this check for Merge to main PR."
exit 0
fi

Copilot uses AI. Check for mistakes.
Signed-off-by: Yanxuan Liu <[email protected]>
Signed-off-by: Yanxuan Liu <[email protected]>
Signed-off-by: Yanxuan Liu <[email protected]>
Copy link
Member

@pxLi pxLi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Please help file dummy PR of common repo to do a post-merge check~

@pxLi pxLi marked this pull request as ready for review June 10, 2025 03:17
@YanxuanLiu YanxuanLiu merged commit 2a6bdb2 into NVIDIA:main Jun 10, 2025
2 checks passed
@YanxuanLiu
Copy link
Collaborator Author

Thanks! Please help file dummy PR of common repo to do a post-merge check~

test run works as expected. https://github.com/NVIDIA/spark-rapids-common/actions/runs/15549785211/job/43778010969?pr=39

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEA] license-header-check to support new branching strategy

2 participants