fix(sync): filter internal co-authors from public snapshots · zai-org/zcode-plugins@ad1a545 · GitHub
Skip to content

Commit ad1a545

Browse files
author
ZCode Marketplace Bot
committed
fix(sync): filter internal co-authors from public snapshots
Source-Commit: fd76675dac915ee68fbae2cac48a59279c461747
1 parent f9a453e commit ad1a545

7 files changed

Lines changed: 38 additions & 7 deletions

File tree

‎assets/icon-sources.json‎

Lines changed: 1 addition & 1 deletion

‎assets/tripo-3d/icon.png‎

-13 KB
Loading

‎marketplace.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
"en": "GitHub CLI workflows for commits, pull requests, issues, releases, Actions, repositories, Codespaces, and other GitHub resources.",
6868
"zh-CN": "基于 GitHub CLI 的 GitHub 工作流,覆盖提交、Pull Request、Issue、Release、Actions、仓库、Codespaces 等资源。"
6969
},
70-
"version": "0.1.2",
70+
"version": "0.1.3",
7171
"author": {
7272
"name": "Z.ai",
7373
"url": "https://z.ai"

‎plugins/github/.claude-plugin/plugin.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "github",
3-
"version": "0.1.2",
3+
"version": "0.1.3",
44
"description": "GitHub CLI workflows for commits, pull requests, issues, releases, Actions, repositories, Codespaces, and other GitHub resources.",
55
"description_i18n": {
66
"en": "GitHub CLI workflows for commits, pull requests, issues, releases, Actions, repositories, Codespaces, and other GitHub resources.",

‎plugins/github/.zcode-plugin/plugin.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "github",
3-
"version": "0.1.2",
3+
"version": "0.1.3",
44
"description": "GitHub CLI workflows for commits, pull requests, issues, releases, Actions, repositories, Codespaces, and other GitHub resources.",
55
"description_i18n": {
66
"en": "GitHub CLI workflows for commits, pull requests, issues, releases, Actions, repositories, Codespaces, and other GitHub resources.",

‎plugins/github/scripts/secret_sync.py‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,9 @@ def parse_quoted_value(raw: str, quote: str, line_number: int) -> str:
9696

9797
def parse_dotenv(text: str) -> list[tuple[str, str]]:
9898
entries: list[tuple[str, str]] = []
99+
# GitHub stores secret names as uppercase and treats lookups as
100+
# case-insensitive. Track that canonical form so a dotenv file cannot
101+
# submit the same remote secret twice under differently-cased names.
99102
seen: set[str] = set()
100103

101104
for line_number, source_line in enumerate(text.splitlines(), start=1):
@@ -116,7 +119,8 @@ def parse_dotenv(text: str) -> list[tuple[str, str]]:
116119
raise DotenvError(f"line {line_number}: invalid secret name")
117120
if key.upper().startswith("GITHUB_"):
118121
raise DotenvError(f"line {line_number}: GITHUB_ names are reserved")
119-
if key in seen:
122+
canonical_key = key.upper()
123+
if canonical_key in seen:
120124
raise DotenvError(f"line {line_number}: duplicate secret name {key}")
121125

122126
raw_value = raw_value.lstrip()
@@ -126,7 +130,7 @@ def parse_dotenv(text: str) -> list[tuple[str, str]]:
126130
value = split_unquoted_value(raw_value)
127131

128132
entries.append((key, value))
129-
seen.add(key)
133+
seen.add(canonical_key)
130134

131135
if not entries:
132136
raise DotenvError("secret file contains no KEY=VALUE entries")

‎tests/test_github_plugin.py‎

Lines changed: 28 additions & 1 deletion

0 commit comments

Comments
 (0)