Skip to content

Commit 3073d20

Browse files
authored
sync: update 8 files from source repository (#61)
1 parent a8e95bf commit 3073d20

File tree

8 files changed

+698
-56
lines changed

8 files changed

+698
-56
lines changed

.github/.env.base

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -232,12 +232,12 @@ REDIS_CACHE_FORCE_PULL=false # Force pull Redis images even when cache
232232
# 🪄 MAGE-X CONFIGURATION
233233
# ================================================================================================
234234

235-
MAGE_X_VERSION=v1.7.15 # https://github.com/mrz1836/mage-x/releases
235+
MAGE_X_VERSION=v1.7.16 # https://github.com/mrz1836/mage-x/releases
236236
MAGE_X_USE_LOCAL=false # Use local version for development
237237
MAGE_X_AUTO_DISCOVER_BUILD_TAGS=true # Enable auto-discovery of build tags
238238
MAGE_X_AUTO_DISCOVER_BUILD_TAGS_EXCLUDE=race,custom # Comma-separated list of tags to exclude
239239
MAGE_X_FORMAT_EXCLUDE_PATHS=vendor,node_modules,.git,.idea # Format exclusion paths (comma-separated directories to exclude from formatting)
240-
MAGE_X_GITLEAKS_VERSION=8.29.0 # https://github.com/gitleaks/gitleaks/releases
240+
MAGE_X_GITLEAKS_VERSION=8.29.1 # https://github.com/gitleaks/gitleaks/releases
241241
MAGE_X_GOFUMPT_VERSION=v0.9.2 # https://github.com/mvdan/gofumpt/releases
242242
MAGE_X_GOLANGCI_LINT_VERSION=v2.6.2 # https://github.com/golangci/golangci-lint/releases
243243
MAGE_X_GORELEASER_VERSION=v2.12.7 # https://github.com/goreleaser/goreleaser/releases
@@ -291,7 +291,7 @@ NANCY_EXCLUDES=CVE-2024-38513,CVE-2023-45142
291291
# Github Secret(s): OSSI_USERNAME and OSSI_TOKEN
292292

293293
# Security Tools
294-
GITLEAKS_VERSION=8.29.0 # https://github.com/gitleaks/gitleaks/releases
294+
GITLEAKS_VERSION=8.29.1 # https://github.com/gitleaks/gitleaks/releases
295295
GOVULNCHECK_VERSION=v1.1.4 # https://pkg.go.dev/golang.org/x/vuln
296296
NANCY_VERSION=v1.0.51 # https://github.com/sonatype-nexus-community/nancy/releases
297297

@@ -300,7 +300,7 @@ NANCY_VERSION=v1.0.51 # https://github.com/sonatype-nexus-commu
300300
# ================================================================================================
301301

302302
# Pre-Commit System
303-
GO_PRE_COMMIT_VERSION=v1.4.2 # https://github.com/mrz1836/go-pre-commit/releases
303+
GO_PRE_COMMIT_VERSION=v1.4.3 # https://github.com/mrz1836/go-pre-commit/releases
304304
GO_PRE_COMMIT_USE_LOCAL=false # Use local version for development
305305

306306
# System Settings
@@ -312,6 +312,7 @@ GO_PRE_COMMIT_PARALLEL_WORKERS=2
312312
GO_PRE_COMMIT_LOG_LEVEL=debug
313313
GO_PRE_COMMIT_MAX_FILE_SIZE_MB=10
314314
GO_PRE_COMMIT_MAX_FILES_OPEN=100
315+
GO_PRE_COMMIT_DEBUG=false # Enable verbose debug output for tool caching and locations
315316

316317
# File Detection Strategy for CI
317318
# true = Check all repository files (comprehensive but slower)
@@ -322,7 +323,7 @@ GO_PRE_COMMIT_ALL_FILES=true
322323
GO_PRE_COMMIT_GOLANGCI_LINT_VERSION=v2.6.2 # https://github.com/golangci/golangci-lint/releases
323324
GO_PRE_COMMIT_FUMPT_VERSION=v0.9.2 # https://github.com/mvdan/gofumpt/releases
324325
GO_PRE_COMMIT_GOIMPORTS_VERSION=latest # https://github.com/golang/tools
325-
GO_PRE_COMMIT_GITLEAKS_VERSION=v8.29.0 # https://github.com/gitleaks/gitleaks/releases
326+
GO_PRE_COMMIT_GITLEAKS_VERSION=v8.29.1 # https://github.com/gitleaks/gitleaks/releases
326327

327328
# Build tags for golangci-lint and other tools
328329
GO_PRE_COMMIT_BUILD_TAGS=
@@ -393,6 +394,8 @@ DEPENDABOT_MAINTAINER_USERNAME=mrz1836
393394
DEPENDABOT_AUTO_MERGE_PATCH=true
394395
DEPENDABOT_AUTO_MERGE_MINOR_DEV=true
395396
DEPENDABOT_AUTO_MERGE_MINOR_PROD=true
397+
DEPENDABOT_AUTO_MERGE_PATCH_INDIRECT=true
398+
DEPENDABOT_AUTO_MERGE_MINOR_INDIRECT=true
396399
DEPENDABOT_AUTO_MERGE_SECURITY_NON_MAJOR=true
397400
DEPENDABOT_ALERT_ON_MAJOR=true
398401
DEPENDABOT_ALERT_ON_MINOR_PROD=true
@@ -418,6 +421,8 @@ AUTO_MERGE_SKIP_FORK_PRS=true
418421
# Note: Fork PRs receive welcome comments from pull-request-management-fork.yml instead
419422
# This setting only affects same-repo PRs (fork PRs use read-only GITHUB_TOKEN)
420423
AUTO_MERGE_COMMENT_ON_FORK_SKIP=true
424+
AUTO_MERGE_REQUIRE_LABEL=true
425+
AUTO_MERGE_LABEL=automerge
421426

422427
# ================================================================================================
423428
# 📝 PULL REQUEST MANAGEMENT CONFIGURATION

.github/workflows/auto-merge-on-approval.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ jobs:
8888
runs-on: ubuntu-latest
8989
permissions:
9090
pull-requests: write # Required: Update PR status and enable auto-merge
91+
issues: write # Required: Add labels and create comments
9192
outputs:
9293
action-taken: ${{ steps.process.outputs.action }}
9394
pr-number: ${{ github.event.pull_request.number }}
@@ -117,6 +118,8 @@ jobs:
117118
SKIP_BOT_PRS=$(echo "$ENV_JSON" | jq -r '.AUTO_MERGE_SKIP_BOT_PRS')
118119
SKIP_FORK_PRS=$(echo "$ENV_JSON" | jq -r '.AUTO_MERGE_SKIP_FORK_PRS')
119120
COMMENT_ON_FORK_SKIP=$(echo "$ENV_JSON" | jq -r '.AUTO_MERGE_COMMENT_ON_FORK_SKIP')
121+
AUTO_MERGE_REQUIRE_LABEL=$(echo "$ENV_JSON" | jq -r '.AUTO_MERGE_REQUIRE_LABEL')
122+
AUTO_MERGE_LABEL=$(echo "$ENV_JSON" | jq -r '.AUTO_MERGE_LABEL')
120123
PREFERRED_TOKEN=$(echo "$ENV_JSON" | jq -r '.PREFERRED_GITHUB_TOKEN')
121124
122125
# Validate required configuration
@@ -138,6 +141,8 @@ jobs:
138141
echo "SKIP_BOT_PRS=$SKIP_BOT_PRS" >> $GITHUB_ENV
139142
echo "SKIP_FORK_PRS=$SKIP_FORK_PRS" >> $GITHUB_ENV
140143
echo "COMMENT_ON_FORK_SKIP=$COMMENT_ON_FORK_SKIP" >> $GITHUB_ENV
144+
echo "AUTO_MERGE_REQUIRE_LABEL=$AUTO_MERGE_REQUIRE_LABEL" >> $GITHUB_ENV
145+
echo "AUTO_MERGE_LABEL=$AUTO_MERGE_LABEL" >> $GITHUB_ENV
141146
142147
# Determine default merge type
143148
DEFAULT_MERGE_TYPE=$(echo "$MERGE_TYPES" | cut -d',' -f1)
@@ -161,6 +166,8 @@ jobs:
161166
echo " 🤖 Skip bot PRs: $SKIP_BOT_PRS"
162167
echo " 🍴 Skip fork PRs: $SKIP_FORK_PRS"
163168
echo " 💬 Comment on fork skip: $COMMENT_ON_FORK_SKIP"
169+
echo " 🏷️ Require automerge label: $AUTO_MERGE_REQUIRE_LABEL"
170+
echo " 🏷️ Automerge label name: $AUTO_MERGE_LABEL"
164171
echo " 🔑 Token: Selected via github-script action"
165172
166173
# --------------------------------------------------------------------
@@ -261,6 +268,21 @@ jobs:
261268
}
262269
}
263270
271+
// ————————————————————————————————————————————————————————————————
272+
// Check for automerge label requirement
273+
// ————————————————————————————————————————————————————————————————
274+
if (process.env.AUTO_MERGE_REQUIRE_LABEL === 'true') {
275+
const automergeLabel = process.env.AUTO_MERGE_LABEL || 'automerge';
276+
const hasAutomergeLabel = labels.includes(automergeLabel);
277+
278+
if (!hasAutomergeLabel) {
279+
console.log(`🏷️ Missing required label "${automergeLabel}" - skipping auto-merge`);
280+
core.setOutput('action', 'skip-missing-automerge-label');
281+
return;
282+
}
283+
console.log(`✅ Has required automerge label: "${automergeLabel}"`);
284+
}
285+
264286
// ————————————————————————————————————————————————————————————————
265287
// Check review conditions
266288
// ————————————————————————————————————————————————————————————————
@@ -517,6 +539,9 @@ jobs:
517539
"skip-wip")
518540
ACTION_DESC="🚧 Skipped (work in progress)"
519541
;;
542+
"skip-missing-automerge-label")
543+
ACTION_DESC="🏷️ Skipped (missing automerge label)"
544+
;;
520545
"conditions-not-met")
521546
ACTION_DESC="⏳ Conditions not met"
522547
;;
@@ -580,6 +605,9 @@ jobs:
580605
skip-fork)
581606
echo "🍴 Action: Skipped - Fork PR (security policy)"
582607
;;
608+
skip-missing-automerge-label)
609+
echo "🏷️ Action: Skipped - Missing automerge label"
610+
;;
583611
skip-*)
584612
echo "⏭️ Action: Skipped - $ACTION"
585613
;;

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747

4848
# Initializes the CodeQL tools for scanning.
4949
- name: Initialize CodeQL
50-
uses: github/codeql-action/init@014f16e7ab1402f30e7c3329d33797e7948572db # v4.31.3
50+
uses: github/codeql-action/init@e12f0178983d466f2f6028f5cc7a6d786fd97f4b # v4.31.4
5151
with:
5252
languages: ${{ matrix.language }}
5353
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -58,7 +58,7 @@ jobs:
5858
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
5959
# If this step fails, then you should remove it and run the build manually (see below)
6060
- name: Autobuild
61-
uses: github/codeql-action/autobuild@014f16e7ab1402f30e7c3329d33797e7948572db # v4.31.3
61+
uses: github/codeql-action/autobuild@e12f0178983d466f2f6028f5cc7a6d786fd97f4b # v4.31.4
6262

6363
# ℹ️ Command-line programs to run using the OS shell.
6464
# 📚 https://git.io/JvXDl
@@ -68,4 +68,4 @@ jobs:
6868
# uses a compiled language
6969

7070
- name: Perform CodeQL Analysis
71-
uses: github/codeql-action/analyze@014f16e7ab1402f30e7c3329d33797e7948572db # v4.31.3
71+
uses: github/codeql-action/analyze@e12f0178983d466f2f6028f5cc7a6d786fd97f4b # v4.31.4

0 commit comments

Comments
 (0)