feat: implement autonomous repository infrastructure - #116
Conversation
- Created AGENTS.md for AI assistant guidelines - Added AI-powered PR reviewer and Issue Triager via GitHub Actions and custom tsx scripts - Created continuous improvement cron loop that runs self-healing via `npm run fix` - Added automated repo intelligence generators for architecture, diagrams, and knowledge graph - Created standard issue and PR templates for contributor experience - Ensured strict security standards by avoiding execSync and securely mapping env vars in workflows Co-authored-by: NITISH-R-G <225521762+NITISH-R-G@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
There was a problem hiding this comment.
Sorry @NITISH-R-G, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
|
Warning Review limit reached
Next review available in: 43 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (9)
📝 WalkthroughWalkthroughAdds simplified contribution templates, AI issue triage and pull-request review workflows, scheduled repository intelligence generation, continuous-improvement automation, and npm commands connecting the new scripts. ChangesAI automation and repository workflows
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Issue as GitHub issue
participant Workflow as AI Issue Triager
participant Script as triage-issues.ts
participant Gemini
participant API as GitHub API
Issue->>Workflow: opened or edited
Workflow->>Script: issue title and body
Script->>Gemini: classify label
Gemini-->>Script: label suggestion
Script->>Workflow: issue_label.txt
Workflow->>API: apply label
sequenceDiagram
participant PR as GitHub pull request
participant Workflow as AI PR Reviewer
participant Script as pr-review.ts
participant Gemini
PR->>Workflow: opened or synchronized
Workflow->>Script: base and head refs
Script->>Script: compute git diff
Script->>Gemini: generate review
Gemini-->>Script: review text
Script->>Workflow: pr_review.txt
Workflow->>PR: tagged review comment
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
- Added `.toString()` to `execFileSync` results to properly parse stdout arrays - Extracted error messages with `error instanceof Error ? error.message : error` to satisfy SonarCloud type assertions - Added missing `GITHUB_TOKEN` mappings with `permissions: pull-requests: write` in GitHub Action workflows (e.g. `ai-pr-reviewer.yml` and `repo-intelligence.yml`) to resolve permission scopes Co-authored-by: NITISH-R-G <225521762+NITISH-R-G@users.noreply.github.com>
There was a problem hiding this comment.
Actionable comments posted: 9
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/ai-issue-triager.yml:
- Around line 7-12: Move the issues write permission from the workflow-level
permissions block into the triage job configuration, keeping it scoped only to
the job that requires it. Remove the top-level permissions declaration and
preserve the existing triage job behavior.
- Around line 14-15: Update the “Checkout Repository” step using
actions/checkout@v4 to disable credential persistence, while leaving the
workflow’s checkout behavior otherwise unchanged.
In @.github/workflows/ai-pr-reviewer.yml:
- Around line 3-5: Add a workflow-level concurrency configuration to the GitHub
Actions workflow triggered by pull_request events, using a pull-request-specific
group and enabling cancellation of in-progress runs so newer synchronize events
supersede outdated runs.
- Around line 26-29: Remove the unused HEAD_REF entry from the workflow env
block, keeping GEMINI_API_KEY and BASE_REF unchanged.
- Around line 7-9: Define explicit least-privilege permissions for the review
job in the jobs.review configuration, granting the GITHUB_TOKEN the pull-request
permission required to post comments while leaving unrelated permissions
restricted.
In @.github/workflows/continuous-improvement.yml:
- Line 31: Add verification steps before pull-request creation in
.github/workflows/continuous-improvement.yml at lines 31-31, running npm run
format, npm run lint, and npm test and requiring all to pass. In
.github/workflows/repo-intelligence.yml at lines 37-37, add npm run format
before auto-committing intelligence updates, and include lint/test when
applicable.
In `@scripts/automation/pr-review.ts`:
- Line 62: Update the script entry point around reviewPR() to use top-level
await for invoking the asynchronous review, replacing the current
.catch(console.error) promise chain while preserving error reporting for
failures.
In `@scripts/automation/triage-issues.ts`:
- Line 2: Remove the unused execFileSync import from the triage-issues script
while leaving all other imports and logic unchanged.
- Line 50: Replace the promise chain invoking triageIssue with top-level await,
preserving the existing execution behavior while allowing unexpected failures to
propagate and produce a non-zero process exit code.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: fb417e8f-e360-407e-9dd5-1a8a1737c443
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (15)
.github/ISSUE_TEMPLATE/bug_report.yml.github/ISSUE_TEMPLATE/feature_request.yml.github/PULL_REQUEST_TEMPLATE/pull_request_template.md.github/workflows/ai-issue-triager.yml.github/workflows/ai-pr-reviewer.yml.github/workflows/continuous-improvement.yml.github/workflows/repo-intelligence.ymlAGENTS.mdpackage.jsonscripts/automation/analyze-repo.tsscripts/automation/continuous-improvement.tsscripts/automation/generate-diagrams.tsscripts/automation/generate-knowledge-graph.tsscripts/automation/pr-review.tsscripts/automation/triage-issues.ts
📜 Review details
⚠️ CI failures not shown inline (2)
GitHub Actions: AI PR Reviewer / review: feat: implement autonomous repository infrastructure
Conclusion: failure
##[group]Run thollander/actions-comment-pull-request@v3
with:
file-path: pr_review.txt
comment-tag: AI_PR_REVIEW
github-***REDACTED***
mode: upsert
create-if-not-exists: true
##[endgroup]
No comment has been found with asked pattern. Creating a new comment.
##[error]Resource not accessible by integration - https://docs.github.com/rest/issues/comments#create-an-issue-comment
GitHub Actions: AI PR Reviewer / 0_review.txt: feat: implement autonomous repository infrastructure
Conclusion: failure
##[group]Run thollander/actions-comment-pull-request@v3
with:
file-path: pr_review.txt
comment-tag: AI_PR_REVIEW
github-***REDACTED***
mode: upsert
create-if-not-exists: true
##[endgroup]
No comment has been found with asked pattern. Creating a new comment.
##[error]Resource not accessible by integration - https://docs.github.com/rest/issues/comments#create-an-issue-comment
🧰 Additional context used
📓 Path-based instructions (3)
.github/workflows/**/*.{yml,yaml}
📄 CodeRabbit inference engine (AGENTS.md)
.github/workflows/**/*.{yml,yaml}: In GitHub Actions workflows, assign event variables such asgithub.base_ref,github.head_ref, andgithub.event.issue.bodydirectly in a step'senvblock, and reference the environment variables in scripts instead of interpolating${{ }}inline.
When generating git diffs in GitHub Actions triggered bypull_requestevents, usegit diff origin/$BASE_REF...HEADrather than referencing$HEAD_REF.
Files:
.github/workflows/ai-issue-triager.yml.github/workflows/repo-intelligence.yml.github/workflows/continuous-improvement.yml.github/workflows/ai-pr-reviewer.yml
scripts/automation/**/*.{js,ts,mjs,cjs}
📄 CodeRabbit inference engine (AGENTS.md)
scripts/automation/**/*.{js,ts,mjs,cjs}: In automation scripts, never useexecSyncwith concatenated strings, especially for user inputs or environment variables; useexecFileSyncwith separate executable and argument arrays, and replace piped commands with native Node.js logic.
Place automation scripts inscripts/automation/and run them viatsx, while following the applicable secure script-execution rules.
Files:
scripts/automation/pr-review.tsscripts/automation/analyze-repo.tsscripts/automation/generate-diagrams.tsscripts/automation/generate-knowledge-graph.tsscripts/automation/triage-issues.tsscripts/automation/continuous-improvement.ts
**/*.{js,ts,jsx,tsx,mjs,cjs}
📄 CodeRabbit inference engine (AGENTS.md)
Do not use
console.log; useconsole.info,console.warn, orconsole.errorin automation scripts and application code.
Files:
scripts/automation/pr-review.tsscripts/automation/analyze-repo.tsscripts/automation/generate-diagrams.tsscripts/automation/generate-knowledge-graph.tsscripts/automation/triage-issues.tsscripts/automation/continuous-improvement.ts
🧠 Learnings (1)
📓 Common learnings
Learnt from: CR
Repo: NITISH-R-G/Intelli-Credit-V2
Timestamp: 2026-07-16T17:25:11.413Z
Learning: Before committing changes, always run `npm test`, `npm run format`, and `npm run lint`, and ensure all checks pass.
Learnt from: CR
Repo: NITISH-R-G/Intelli-Credit-V2
Timestamp: 2026-07-16T17:25:11.413Z
Learning: Use `npm run fix` before requesting human intervention for linting or formatting issues.
🪛 ast-grep (0.44.1)
scripts/automation/pr-review.ts
[warning] 1-1: Importing child_process exposes a command-execution surface; ensure any command/argument built from input is validated, and prefer execFile/spawn with an argument array over exec.
Context: import { execFileSync } from 'node:child_process';
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
(detect-child-process-typescript)
scripts/automation/analyze-repo.ts
[warning] 32-32: Filesystem path is not a string literal; a request-/variable-derived path can enable path traversal. Validate and normalize the path before use.
Context: fs.writeFileSync(path.join(docsPath, 'repo-analysis.md'), analysisContent)
Note: [CWE-22] Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
(detect-non-literal-fs-filename-typescript)
scripts/automation/generate-diagrams.ts
[warning] 23-23: Filesystem path is not a string literal; a request-/variable-derived path can enable path traversal. Validate and normalize the path before use.
Context: fs.writeFileSync(path.join(docsPath, 'SERVICE_MAP.md'), mermaidDiagram)
Note: [CWE-22] Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
(detect-non-literal-fs-filename-typescript)
scripts/automation/generate-knowledge-graph.ts
[warning] 2-2: Importing child_process exposes a command-execution surface; ensure any command/argument built from input is validated, and prefer execFile/spawn with an argument array over exec.
Context: import { execFileSync } from 'node:child_process';
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
(detect-child-process-typescript)
[warning] 26-26: Filesystem path is not a string literal; a request-/variable-derived path can enable path traversal. Validate and normalize the path before use.
Context: fs.writeFileSync(path.join(docsPath, 'KNOWLEDGE_GRAPH.md'), graphContent)
Note: [CWE-22] Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
(detect-non-literal-fs-filename-typescript)
scripts/automation/triage-issues.ts
[warning] 1-1: Importing child_process exposes a command-execution surface; ensure any command/argument built from input is validated, and prefer execFile/spawn with an argument array over exec.
Context: import { execFileSync } from 'node:child_process';
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
(detect-child-process-typescript)
scripts/automation/continuous-improvement.ts
[warning] Importing child_process exposes a command-execution surface; ensure any command/argument built from input is validated, and prefer execFile/spawn with an argument array over exec.
Context: import { execFileSync } from 'node:child_process';
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
(detect-child-process-typescript)
🪛 GitHub Check: SonarCloud Code Analysis
scripts/automation/pr-review.ts
[warning] 17-17: Make sure the "PATH" variable only contains fixed, unwriteable directories.
[warning] 62-62: Prefer top-level await over using a promise chain.
.github/workflows/repo-intelligence.yml
[failure] 38-38: Use full commit SHA hash for this dependency.
scripts/automation/generate-knowledge-graph.ts
[warning] 14-14: Make sure the "PATH" variable only contains fixed, unwriteable directories.
scripts/automation/triage-issues.ts
[warning] 2-2: Remove this unused import of 'execFileSync'.
[warning] 50-50: Prefer top-level await over using a promise chain.
.github/workflows/ai-pr-reviewer.yml
[failure] 33-33: Use full commit SHA hash for this dependency.
scripts/automation/continuous-improvement.ts
[warning] 8-8: Make sure the "PATH" variable only contains fixed, unwriteable directories.
[warning] 22-22: Make sure the "PATH" variable only contains fixed, unwriteable directories.
[warning] 15-15: Make sure the "PATH" variable only contains fixed, unwriteable directories.
[warning] 29-29: Make sure the "PATH" variable only contains fixed, unwriteable directories.
🪛 LanguageTool
AGENTS.md
[uncategorized] ~14-~14: The official name of this software platform is spelled with a capital “H”.
Context: ...Actions workflows, event variables like github.base_ref, github.head_ref, and `gith...
(GITHUB)
[uncategorized] ~14-~14: The official name of this software platform is spelled with a capital “H”.
Context: ...event variables like github.base_ref, github.head_ref, and `github.event.issue.body...
(GITHUB)
[uncategorized] ~14-~14: The official name of this software platform is spelled with a capital “H”.
Context: ...ithub.base_ref, github.head_ref, and github.event.issue.body` must be assigned ...
(GITHUB)
🪛 markdownlint-cli2 (0.23.0)
AGENTS.md
[warning] 5-5: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below
(MD022, blanks-around-headings)
[warning] 9-9: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below
(MD022, blanks-around-headings)
[warning] 13-13: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below
(MD022, blanks-around-headings)
[warning] 17-17: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below
(MD022, blanks-around-headings)
[warning] 21-21: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below
(MD022, blanks-around-headings)
[warning] 24-24: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below
(MD022, blanks-around-headings)
🪛 zizmor (1.26.1)
.github/workflows/ai-issue-triager.yml
[warning] 14-15: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false
(artipacked)
[error] 8-8: overly broad permissions (excessive-permissions): issues: write is overly broad at the workflow level
(excessive-permissions)
[error] 15-15: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)
(unpinned-uses)
[error] 18-18: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)
(unpinned-uses)
[error] 34-34: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)
(unpinned-uses)
[warning] 8-8: permissions without explanatory comments (undocumented-permissions): needs an explanatory comment
(undocumented-permissions)
[info] 11-11: workflow or action definition without a name (anonymous-definition): this job
(anonymous-definition)
[warning] 3-5: insufficient job-level concurrency limits (concurrency-limits): workflow is missing concurrency setting
(concurrency-limits)
.github/workflows/repo-intelligence.yml
[warning] 16-17: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false
(artipacked)
[error] 10-10: overly broad permissions (excessive-permissions): contents: write is overly broad at the workflow level
(excessive-permissions)
[error] 17-17: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)
(unpinned-uses)
[error] 20-20: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)
(unpinned-uses)
[error] 38-38: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)
(unpinned-uses)
[warning] 10-10: permissions without explanatory comments (undocumented-permissions): needs an explanatory comment
(undocumented-permissions)
[info] 13-13: workflow or action definition without a name (anonymous-definition): this job
(anonymous-definition)
[warning] 3-7: insufficient job-level concurrency limits (concurrency-limits): workflow is missing concurrency setting
(concurrency-limits)
[info] 38-38: action functionality is already included by the runner (superfluous-actions): use git add, git commit, and git push in a script step
(superfluous-actions)
.github/workflows/continuous-improvement.yml
[warning] 16-17: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false
(artipacked)
[error] 9-9: overly broad permissions (excessive-permissions): contents: write is overly broad at the workflow level
(excessive-permissions)
[error] 10-10: overly broad permissions (excessive-permissions): pull-requests: write is overly broad at the workflow level
(excessive-permissions)
[error] 17-17: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)
(unpinned-uses)
[error] 20-20: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)
(unpinned-uses)
[error] 32-32: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)
(unpinned-uses)
[warning] 9-9: permissions without explanatory comments (undocumented-permissions): needs an explanatory comment
(undocumented-permissions)
[info] 13-13: workflow or action definition without a name (anonymous-definition): this job
(anonymous-definition)
[warning] 3-6: insufficient job-level concurrency limits (concurrency-limits): workflow is missing concurrency setting
(concurrency-limits)
[info] 32-32: action functionality is already included by the runner (superfluous-actions): use gh pr create in a script step
(superfluous-actions)
.github/workflows/ai-pr-reviewer.yml
[warning] 11-14: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false
(artipacked)
[warning] 1-37: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block
(excessive-permissions)
[error] 12-12: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)
(unpinned-uses)
[error] 17-17: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)
(unpinned-uses)
[error] 33-33: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)
(unpinned-uses)
[info] 8-8: workflow or action definition without a name (anonymous-definition): this job
(anonymous-definition)
[warning] 3-5: insufficient job-level concurrency limits (concurrency-limits): workflow is missing concurrency setting
(concurrency-limits)
🔇 Additional comments (8)
.github/ISSUE_TEMPLATE/bug_report.yml (1)
2-24: LGTM!.github/ISSUE_TEMPLATE/feature_request.yml (1)
3-25: LGTM!.github/PULL_REQUEST_TEMPLATE/pull_request_template.md (1)
3-27: LGTM!package.json (1)
32-39: LGTM!scripts/automation/analyze-repo.ts (1)
1-38: LGTM!scripts/automation/generate-diagrams.ts (1)
1-29: LGTM!scripts/automation/generate-knowledge-graph.ts (1)
1-35: LGTM!scripts/automation/continuous-improvement.ts (1)
1-38: LGTM!
| permissions: | ||
| issues: write | ||
|
|
||
| jobs: | ||
| triage: | ||
| runs-on: ubuntu-latest |
There was a problem hiding this comment.
🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win
Restrict overly broad permissions to the job level.
Setting permissions: issues: write at the workflow level grants this permission to all jobs in the workflow. It is best practice to define permissions at the job level to adhere to the principle of least privilege.
🔒️ Proposed fix
-permissions:
- issues: write
-
jobs:
triage:
runs-on: ubuntu-latest
+ permissions:
+ issues: write📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| permissions: | |
| issues: write | |
| jobs: | |
| triage: | |
| runs-on: ubuntu-latest | |
| jobs: | |
| triage: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| issues: write |
🧰 Tools
🪛 zizmor (1.26.1)
[error] 8-8: overly broad permissions (excessive-permissions): issues: write is overly broad at the workflow level
(excessive-permissions)
[warning] 8-8: permissions without explanatory comments (undocumented-permissions): needs an explanatory comment
(undocumented-permissions)
[info] 11-11: workflow or action definition without a name (anonymous-definition): this job
(anonymous-definition)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/ai-issue-triager.yml around lines 7 - 12, Move the issues
write permission from the workflow-level permissions block into the triage job
configuration, keeping it scoped only to the job that requires it. Remove the
top-level permissions declaration and preserve the existing triage job behavior.
| - name: Checkout Repository | ||
| uses: actions/checkout@v4 |
There was a problem hiding this comment.
🔒 Security & Privacy | 🔵 Trivial | 💤 Low value
Disable credential persistence in checkout.
By default, actions/checkout persists the GITHUB_TOKEN in the local Git configuration. Since this workflow does not perform any git push operations, you can safely disable this feature to prevent the token from being exposed to subsequent steps (e.g., third-party install scripts during npm ci).
🔒️ Proposed fix
- name: Checkout Repository
uses: actions/checkout@v4
+ with:
+ persist-credentials: false📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false |
🧰 Tools
🪛 zizmor (1.26.1)
[warning] 14-15: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false
(artipacked)
[error] 15-15: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)
(unpinned-uses)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/ai-issue-triager.yml around lines 14 - 15, Update the
“Checkout Repository” step using actions/checkout@v4 to disable credential
persistence, while leaving the workflow’s checkout behavior otherwise unchanged.
| on: | ||
| pull_request: | ||
| types: [opened, synchronize] |
There was a problem hiding this comment.
🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win
Add concurrency limits.
Since this workflow runs on the synchronize event, multiple pushes in quick succession will trigger multiple parallel workflow runs. This can waste Gemini API quotas and result in multiple or out-of-order comments on the PR. Adding a concurrency group will cancel outdated runs automatically.
♻️ Proposed fix
on:
pull_request:
types: [opened, synchronize]
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
+ cancel-in-progress: true📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| on: | |
| pull_request: | |
| types: [opened, synchronize] | |
| on: | |
| pull_request: | |
| types: [opened, synchronize] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number }} | |
| cancel-in-progress: true |
🧰 Tools
🪛 zizmor (1.26.1)
[warning] 3-5: insufficient job-level concurrency limits (concurrency-limits): workflow is missing concurrency setting
(concurrency-limits)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/ai-pr-reviewer.yml around lines 3 - 5, Add a
workflow-level concurrency configuration to the GitHub Actions workflow
triggered by pull_request events, using a pull-request-specific group and
enabling cancellation of in-progress runs so newer synchronize events supersede
outdated runs.
| env: | ||
| GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} | ||
| BASE_REF: ${{ github.base_ref }} | ||
| HEAD_REF: ${{ github.head_ref }} |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value
Remove unused environment variable.
The HEAD_REF environment variable is not read by the underlying pr-review.ts script. It can be safely removed to clean up the environment context.
♻️ Proposed refactor
- name: Run AI PR Review
env:
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
BASE_REF: ${{ github.base_ref }}
- HEAD_REF: ${{ github.head_ref }}
run: npm run ai:pr-review📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| env: | |
| GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} | |
| BASE_REF: ${{ github.base_ref }} | |
| HEAD_REF: ${{ github.head_ref }} | |
| env: | |
| GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} | |
| BASE_REF: ${{ github.base_ref }} |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/ai-pr-reviewer.yml around lines 26 - 29, Remove the unused
HEAD_REF entry from the workflow env block, keeping GEMINI_API_KEY and BASE_REF
unchanged.
| - name: Run Continuous Improvement Loop | ||
| run: npm run ai:improve | ||
|
|
||
| - name: Create Pull Request |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Run formatting, linting, and testing before committing changes.
Both workflows generate and commit files but miss the final verification steps. Based on learnings, you should always run npm test, npm run format, and npm run lint (and ensure all checks pass) before committing changes to ensure the generated artifacts comply with repository standards.
.github/workflows/continuous-improvement.yml#L31-L31: add a step to runnpm run format,npm run lint, andnpm testbefore creating the pull request..github/workflows/repo-intelligence.yml#L37-L37: add a step to runnpm run format(and lint/test if applicable) before auto-committing the intelligence updates.
📍 Affects 2 files
.github/workflows/continuous-improvement.yml#L31-L31(this comment).github/workflows/repo-intelligence.yml#L37-L37
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/continuous-improvement.yml at line 31, Add verification
steps before pull-request creation in
.github/workflows/continuous-improvement.yml at lines 31-31, running npm run
format, npm run lint, and npm test and requiring all to pass. In
.github/workflows/repo-intelligence.yml at lines 37-37, add npm run format
before auto-committing intelligence updates, and include lint/test when
applicable.
Source: Learnings
| } | ||
| } | ||
|
|
||
| reviewPR().catch(console.error); |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value
Prefer top-level await.
Since this script runs in an environment supporting ES modules (Node.js 20 is configured in the workflow) or via tsx, you can use a top-level await instead of a promise chain for cleaner syntax.
♻️ Proposed refactor
-reviewPR().catch(console.error);
+try {
+ await reviewPR();
+} catch (error) {
+ console.error(error);
+}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| reviewPR().catch(console.error); | |
| try { | |
| await reviewPR(); | |
| } catch (error) { | |
| console.error(error); | |
| } |
🧰 Tools
🪛 GitHub Check: SonarCloud Code Analysis
[warning] 62-62: Prefer top-level await over using a promise chain.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@scripts/automation/pr-review.ts` at line 62, Update the script entry point
around reviewPR() to use top-level await for invoking the asynchronous review,
replacing the current .catch(console.error) promise chain while preserving error
reporting for failures.
| fs.writeFileSync('issue_label.txt', label); | ||
| } | ||
|
|
||
| triageIssue().catch(console.error); |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win
Prefer top-level await over a promise chain.
Using top-level await ensures that any unexpected unhandled promise rejections (such as a file system error when writing the label) result in a non-zero exit code. This correctly fails the GitHub Actions step rather than allowing it to silently succeed with an exit code of 0.
♻️ Proposed fix
-triageIssue().catch(console.error);
+await triageIssue();📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| triageIssue().catch(console.error); | |
| await triageIssue(); |
🧰 Tools
🪛 GitHub Check: SonarCloud Code Analysis
[warning] 50-50: Prefer top-level await over using a promise chain.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@scripts/automation/triage-issues.ts` at line 50, Replace the promise chain
invoking triageIssue with top-level await, preserving the existing execution
behavior while allowing unexpected failures to propagate and produce a non-zero
process exit code.
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
|
GEMINI_API_KEY not found. Skipping AI review. |
Node 20 is deprecated on GitHub Actions runners, so Node versions across checkout actions have been upgraded to 22. Co-authored-by: NITISH-R-G <225521762+NITISH-R-G@users.noreply.github.com>
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
Pin setup-node and checkout to precise git hashes to circumvent SonarCloud code duplication and workflow deprecation issues, specifically pinning Node to v22 securely. Co-authored-by: NITISH-R-G <225521762+NITISH-R-G@users.noreply.github.com>
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
|


This PR introduces a comprehensive, repository-wide automation and governance system that operates continuously with minimal human intervention.
Key improvements:
scripts/automation/scripts to generate dynamic repository analysis, knowledge graphs, and service map diagrams.triage-issues.tsandpr-review.tsalongside their respective GitHub Actions workflows to autonomously label issues and comment on pull requests using Google Gemini.continuous-improvement.ymlworkflow that triggersnpm run improve(running lint auto-fixes and repo diagnostics) and opens automated PRs.ISSUE_TEMPLATEs, aPULL_REQUEST_TEMPLATE, and anAGENTS.mdto ensure AI agents behave predictably and securely.execFileSyncinstead ofexecSyncand securely routing GitHub Action context variables through environment parameters.PR created automatically by Jules for task 14277583595610446346 started by @NITISH-R-G