From 24813c4bc72d3cf08c381b7220db8161881edc8c Mon Sep 17 00:00:00 2001 From: Sameera Priyatham Tadikonda Date: Mon, 2 Feb 2026 11:18:09 -0800 Subject: [PATCH 1/2] Update copyright headers based on prompt --- .github/prompts/copyright.prompt.md | 49 +++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/prompts/copyright.prompt.md diff --git a/.github/prompts/copyright.prompt.md b/.github/prompts/copyright.prompt.md new file mode 100644 index 000000000..feaa8c270 --- /dev/null +++ b/.github/prompts/copyright.prompt.md @@ -0,0 +1,49 @@ +--- +description: Update or add copyright headers to changed files +--- + +# Copyright Agent + +Check git changed files and update/add copyright headers. + +## Configuration +``` +COPYRIGHT_HOLDER = "Progress Software Corporation and/or its subsidiaries or affiliates" +COPYRIGHT_START_YEAR = "auto" +``` + +## Copyright Format +``` +Copyright (c) {START_YEAR}-{CURRENT_YEAR} {COPYRIGHT_HOLDER}. All Rights Reserved. +``` + +## Start Year Detection +1. **Existing copyright in file**: Preserve the start year, update end year only +2. **New file + auto mode**: Find start year from other files in repo + - If one consistent year found: Use it + - If multiple years or none found: **ASK USER** +3. **Explicit year set**: Use that for new files + +## Files Needing Copyright +| Extension | Comment Style | +|-----------|---------------| +| `.java`, `.groovy`, `.kt`, `.scala`, `.js`, `.ts`, `.tsx`, `.c`, `.cpp`, `.h`, `.go`, `.rs`, `.swift`, `.cs` | `/* ... */` | +| `.py`, `.rb`, `.sh`, `.bash`, `.pl`, `.ps1`, `.r` | `# ...` | +| `.sql`, `.lua`, `.hs`, `.vhd` | `-- ...` | +| `.xqy`, `.xq`, `.xquery` | `(: ... :)` | +| `.xml`, `.xsl` | `` | +| `.erl` | `%% ...` | +| `.clj`, `.lisp` | `;;; ...` | + +## Files to SKIP +`build.gradle`, `pom.xml`, `settings.gradle`, `*.properties`, `*.json`, `*.yml`, `*.yaml`, `*.md`, `*.txt`, `*.html`, `*.css`, `Dockerfile`, `Jenkinsfile`, `.gitignore`, `gradlew`, lock files, `node_modules/`, `build/`, `target/` + +## Actions +1. Check git changed files (staged + unstaged) +2. For each source file: + - Has copyright with correct holder → Update end year to current year + - Missing copyright → Add header with correct comment style + - Different copyright holder → Skip (third-party) +3. Report summary table of actions taken + +Never guess start year. Ask user when uncertain. From b42a56c89fbefd03ecbdd2c4c25d6fe2587a8e1a Mon Sep 17 00:00:00 2001 From: Rob Rudin Date: Mon, 2 Feb 2026 14:31:49 -0500 Subject: [PATCH 2/2] MLE-26427 Copyright prompt test --- .../src/test/java/com/marklogic/client/test/City.java | 1 + 1 file changed, 1 insertion(+) diff --git a/marklogic-client-api/src/test/java/com/marklogic/client/test/City.java b/marklogic-client-api/src/test/java/com/marklogic/client/test/City.java index c0ec4a9be..101fcf598 100644 --- a/marklogic-client-api/src/test/java/com/marklogic/client/test/City.java +++ b/marklogic-client-api/src/test/java/com/marklogic/client/test/City.java @@ -8,6 +8,7 @@ import jakarta.xml.bind.annotation.XmlRootElement; +// Modifying this file to see if the copyright prompt changes it automatically. @XmlRootElement public class City { private int geoNameId;