From 54dbd206949ac1020e7ef63109289ae58a49d1a3 Mon Sep 17 00:00:00 2001 From: Sameera Priyatham Tadikonda Date: Tue, 2 Sep 2025 11:23:25 -0700 Subject: [PATCH 1/3] PDP-536: Adding copyright check --- .copyrightconfig | 14 ++++++++++++++ .github/workflows/pr-workflow.yaml | 16 ++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 .copyrightconfig create mode 100644 .github/workflows/pr-workflow.yaml diff --git a/.copyrightconfig b/.copyrightconfig new file mode 100644 index 0000000..327505a --- /dev/null +++ b/.copyrightconfig @@ -0,0 +1,14 @@ +# COPYRIGHT VALIDATION CONFIG +# --------------------------------- +# Required start year (keep fixed; end year auto-updates in check output) +startyear: 2013 + +# Optional exclusions list (comma-separated). Leave commented if none. +# Rules: +# - Relative paths (no leading ./) +# - Simple * wildcard only (no recursive **) +# - Use sparingly (third_party, generated, binary assets) +# - Dotfiles already skipped automatically +# Enable by removing the leading '# ' from the next line and editing values. +# filesexcluded: third_party/*, docs/generated/*.md, assets/*.png, scripts/temp_*.py, vendor/lib.js +filesexcluded: .github/*, README.md, LICENSE, Makefile diff --git a/.github/workflows/pr-workflow.yaml b/.github/workflows/pr-workflow.yaml new file mode 100644 index 0000000..f825744 --- /dev/null +++ b/.github/workflows/pr-workflow.yaml @@ -0,0 +1,16 @@ +name: 🏷️ JIRA ID Validator + +on: + # Using pull_request_target instead of pull_request to handle PRs from forks + pull_request_target: + types: [opened, edited, reopened, synchronize] + # No branch filtering - will run on all PRs + +jobs: + jira-pr-check: + name: 🏷️ Validate JIRA ticket ID + # Use the reusable workflow from the central repository + uses: marklogic/pr-workflows/.github/workflows/jira-id-check.yml@main + with: + # Pass the PR title from the event context + pr-title: ${{ github.event.pull_request.title }} \ No newline at end of file From e0085643dc10e9a71d633f861d32676d6db0d8b8 Mon Sep 17 00:00:00 2001 From: SameeraPriyathamTadikonda Date: Tue, 2 Sep 2025 11:26:44 -0700 Subject: [PATCH 2/3] Rename workflow --- .github/workflows/pr-workflow.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-workflow.yaml b/.github/workflows/pr-workflow.yaml index f825744..396a87a 100644 --- a/.github/workflows/pr-workflow.yaml +++ b/.github/workflows/pr-workflow.yaml @@ -1,4 +1,4 @@ -name: 🏷️ JIRA ID Validator +name: PR Workflow on: # Using pull_request_target instead of pull_request to handle PRs from forks @@ -13,4 +13,4 @@ jobs: uses: marklogic/pr-workflows/.github/workflows/jira-id-check.yml@main with: # Pass the PR title from the event context - pr-title: ${{ github.event.pull_request.title }} \ No newline at end of file + pr-title: ${{ github.event.pull_request.title }} From f069a1d6d7741b393dbe7108044437bea19aaf5c Mon Sep 17 00:00:00 2001 From: SameeraPriyathamTadikonda Date: Tue, 2 Sep 2025 11:31:05 -0700 Subject: [PATCH 3/3] Add copyright check --- .github/workflows/pr-workflow.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/pr-workflow.yaml b/.github/workflows/pr-workflow.yaml index 396a87a..9165227 100644 --- a/.github/workflows/pr-workflow.yaml +++ b/.github/workflows/pr-workflow.yaml @@ -14,3 +14,10 @@ jobs: with: # Pass the PR title from the event context pr-title: ${{ github.event.pull_request.title }} + copyright-validation: + name: © Validate Copyright Headers + uses: marklogic/pr-workflows/.github/workflows/copyright-check.yml@main + permissions: + contents: read + pull-requests: write + issues: write