-
Notifications
You must be signed in to change notification settings - Fork 9
ci(cliproxyapi-plusplus): add golangci-lint configuration #1004
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
452103f
9be7dba
fe13450
0451a3f
930b614
b00b205
9f684c9
94497b3
2d37b46
9b2d42d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| blank_issues_enabled: true | ||
| contact_links: | ||
| - name: Phenotype org | ||
| url: https://github.com/KooshaPari | ||
| about: Other Phenotype-ecosystem repos and discussions |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,16 +1,19 @@ | ||
| name: Alert sync issues | ||
| on: | ||
| push: | ||
| branches: [main, master, develop] | ||
| pull_request: | ||
| branches: [main, master, develop] | ||
| schedule: | ||
| - cron: '17 * * * *' | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
| issues: write | ||
|
|
||
| jobs: | ||
| sync: | ||
| uses: KooshaPari/phenoShared/.github/workflows/alert-sync-issues.yml@main | ||
| uses: KooshaPari/phenoShared/.github/workflows/alert-sync-issues.yml@4b820a6d1eca7884e692e4ec4edf2b59732809cd | ||
| with: | ||
| auto-label: auto-alert-sync | ||
| min_severity: high |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,8 +1,11 @@ | ||||||||||||||||||
| name: coderabbit-rate-limit-retry | ||||||||||||||||||
|
|
||||||||||||||||||
| on: | ||||||||||||||||||
| push: | ||||||||||||||||||
| branches: [main, master, develop] | ||||||||||||||||||
| pull_request: | ||||||||||||||||||
| branches: [main, master, develop] | ||||||||||||||||||
| workflow_dispatch: | ||||||||||||||||||
|
|
||||||||||||||||||
| permissions: | ||||||||||||||||||
| checks: write | ||||||||||||||||||
| contents: read | ||||||||||||||||||
|
|
@@ -15,7 +18,8 @@ jobs: | |||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||
| steps: | ||||||||||||||||||
| - name: Re-request CodeRabbit when backlog is high and check is stale | ||||||||||||||||||
| uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7with: | ||||||||||||||||||
| uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7 | ||||||||||||||||||
| with: | ||||||||||||||||||
| script: | | ||||||||||||||||||
| const owner = context.repo.owner; | ||||||||||||||||||
| const repo = context.repo.repo; | ||||||||||||||||||
|
|
@@ -166,7 +170,7 @@ jobs: | |||||||||||||||||
| status: "completed", | ||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. CRITICAL: JavaScript syntax error - ternary expression incorrectly wrapped in quotes The entire ternary expression has been wrapped in quotes, making it a string literal instead of executable code. This will cause a JavaScript syntax error.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. CRITICAL: JavaScript syntax error - ternary expression incorrectly wrapped in quotes The entire ternary expression has been wrapped in quotes, making it a string literal instead of executable code. This will cause a JavaScript syntax error.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. CRITICAL: JavaScript syntax error - ternary expression incorrectly wrapped in quotes The entire ternary expression has been wrapped in quotes, making it a string literal instead of executable code. This will cause a JavaScript syntax error.
Suggested change
|
||||||||||||||||||
| conclusion: pass ? "success" : "failure", | ||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. CRITICAL: JavaScript syntax error - mismatched quotes in title string The line has invalid JavaScript due to quote mismatch. It should be:
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. CRITICAL: JavaScript syntax error - mismatched quotes in title string The line has invalid JavaScript due to quote mismatch. It should be:
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. CRITICAL: JavaScript syntax error - mismatched quotes in title string The line has invalid JavaScript due to quote mismatch. It should be:
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. CRITICAL: JavaScript syntax error - mismatched quotes in title string The line has invalid JavaScript due to quote mismatch. It should be:
Suggested change
|
||||||||||||||||||
| output: { | ||||||||||||||||||
| title: pass ? "CodeRabbit gate passed" : "CodeRabbit gate blocked", | ||||||||||||||||||
| title: "pass ? "CodeRabbit gate passed" : "CodeRabbit gate blocked"," | ||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. JavaScript ternary expression corrupted into broken string literalHigh Severity The Reviewed by Cursor Bugbot for commit b00b205. Configure here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. CRITICAL: JavaScript syntax error - ternary expression incorrectly wrapped in quotes The entire ternary expression has been wrapped in quotes, making it a string literal instead of executable code. This will cause a JavaScript syntax error.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. CRITICAL: JavaScript syntax error - ternary expression incorrectly wrapped in quotes The entire ternary expression has been wrapped in quotes, making it a string literal instead of executable code. This will cause a JavaScript syntax error.
Suggested change
|
||||||||||||||||||
| summary, | ||||||||||||||||||
|
Comment on lines
+173
to
174
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔴 Architect Review — CRITICAL Inside the GitHub Script step, Suggestion: Restore a valid expression for Fix in Cursor | Fix in VSCode Claude (Use Cmd/Ctrl + Click for best experience) Prompt for AI Agent 🤖This is an **Architect / Logical Review** comment left during a code review. These reviews are first-class, important findings — not optional suggestions. Do NOT dismiss this as a 'big architectural change' just because the title says architect review; most of these can be resolved with a small, localized fix once the intent is understood.
**Path:** .github/workflows/coderabbit-rate-limit-retry.yml
**Line:** 173:174
**Comment:**
*CRITICAL: Inside the GitHub Script step, `output.title` is set to a malformed JavaScript string literal (`"pass ? "CodeRabbit gate passed" : "CodeRabbit gate blocked","`), which has unbalanced quotes and is syntactically invalid. This causes the `github.rest.checks.create` call to throw at runtime so the CodeRabbit gate check cannot be published.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
If a suggested approach is provided above, use it as the authoritative instruction. If no explicit code suggestion is given, you MUST still draft and apply your own minimal, localized fix — do not punt back with 'no suggestion provided, review manually'. Keep the change as small as possible: add a guard clause, gate on a loading state, reorder an await, wrap in a conditional, etc. Do not refactor surrounding code or expand scope beyond the finding.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix |
||||||||||||||||||
| }, | ||||||||||||||||||
| }); | ||||||||||||||||||
|
|
||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,11 @@ | ||
| name: docker-image | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main, master, develop] | ||
| pull_request: | ||
| branches: [main, master, develop] | ||
| workflow_dispatch: | ||
|
|
||
| env: | ||
| APP_NAME: CLIProxyAPI | ||
| DOCKERHUB_REPO: ${{ secrets.DOCKERHUB_USERNAME }}/cli-proxy-api-plus | ||
|
|
@@ -15,13 +18,16 @@ jobs: | |
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5@11bd71901bbe5b1630ceea73d27597364c9af683 # v4- name: Refresh models catalog | ||
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | ||
| - name: Refresh models catalog | ||
| run: | | ||
| git fetch --depth 1 https://github.com/router-for-me/models.git main | ||
| git show FETCH_HEAD:models.json > internal/registry/models/models.json | ||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3- name: Login to DockerHub | ||
| uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3with: | ||
| uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3 | ||
| - name: Login to DockerHub | ||
| uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3 | ||
| with: | ||
| username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
| password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
| - name: Generate Build Metadata | ||
|
|
@@ -30,7 +36,8 @@ jobs: | |
| echo COMMIT=`git rev-parse --short HEAD` >> $GITHUB_ENV | ||
| echo BUILD_DATE=`date -u +%Y-%m-%dT%H:%M:%SZ` >> $GITHUB_ENV | ||
| - name: Build and push (amd64) | ||
| uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6with: | ||
| uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6 | ||
| with: | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Docker push on PRsHigh Severity
Reviewed by Cursor Bugbot for commit 9b2d42d. Configure here. |
||
| context: . | ||
| platforms: linux/amd64 | ||
| push: true | ||
|
|
@@ -46,13 +53,16 @@ jobs: | |
| runs-on: ubuntu-24.04-arm | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5@11bd71901bbe5b1630ceea73d27597364c9af683 # v4- name: Refresh models catalog | ||
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | ||
| - name: Refresh models catalog | ||
| run: | | ||
| git fetch --depth 1 https://github.com/router-for-me/models.git main | ||
| git show FETCH_HEAD:models.json > internal/registry/models/models.json | ||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3- name: Login to DockerHub | ||
| uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3with: | ||
| uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3 | ||
| - name: Login to DockerHub | ||
| uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3 | ||
| with: | ||
| username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
| password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
| - name: Generate Build Metadata | ||
|
|
@@ -61,7 +71,8 @@ jobs: | |
| echo COMMIT=`git rev-parse --short HEAD` >> $GITHUB_ENV | ||
| echo BUILD_DATE=`date -u +%Y-%m-%dT%H:%M:%SZ` >> $GITHUB_ENV | ||
| - name: Build and push (arm64) | ||
| uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6with: | ||
| uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6 | ||
| with: | ||
| context: . | ||
| platforms: linux/arm64 | ||
| push: true | ||
|
|
@@ -80,9 +91,12 @@ jobs: | |
| - docker_arm64 | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5@11bd71901bbe5b1630ceea73d27597364c9af683 # v4- name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3- name: Login to DockerHub | ||
| uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3with: | ||
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | ||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3 | ||
| - name: Login to DockerHub | ||
| uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3 | ||
| with: | ||
| username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
| password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
| - name: Generate Build Metadata | ||
|
|
@@ -102,7 +116,7 @@ jobs: | |
| "${DOCKERHUB_REPO}:${VERSION}-arm64" | ||
| - name: Cleanup temporary tags | ||
| continue-on-error: true | ||
| env: | ||
| - env: | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Docker cleanup step split from its name and configMedium Severity The "Cleanup temporary tags" step was split into two steps: one with just Reviewed by Cursor Bugbot for commit b00b205. Configure here. |
||
| DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | ||
| DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} | ||
| run: | | ||
|
|
||


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checkout and CodeQL init merged into single step
High Severity
The Checkout step and Initialize CodeQL step have been merged into a single YAML mapping with duplicate
name:anduses:keys. YAML uses the last value for duplicate keys, so onlygithub/codeql-action/initruns — theactions/checkoutstep is silently dropped. CodeQL analysis will fail because no code is checked out.Reviewed by Cursor Bugbot for commit b00b205. Configure here.