Skip to content
Merged
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions license-header-check/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ runs:
# Get license pattern with year
CURRENT_YEAR=$(date +%Y)
LICENSE_PATTERN="Copyright \(c\) .*?${CURRENT_YEAR},? NVIDIA CORPORATION."

# Skip for merge to main
PR_TITLE="${{ github.event.pull_request.title }}"
Copy link
Member

Choose a reason for hiding this comment

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

check title is not promising and could cause some issue, can we do the check based on the PR.base?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, changed to use base.ref

PR_TITLE_REGEX="^Merge branch-[0-9]+.[0-9]+ into main"
if [[ $PR_TITLE =~ $PR_TITLE_REGEX ]]; then
echo "Skip this check for Merge to main PR."
exit 0
fi

# Format file patterns
IFS="," read -r -a INCLUDE_PATTERNS <<< "$(echo "${{ inputs.included_file_patterns }}" | tr -d ' ' | tr -d '\n')"
Expand Down