-
Notifications
You must be signed in to change notification settings - Fork 1
added extra logs #27
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
base: main
Are you sure you want to change the base?
added extra logs #27
Changes from all commits
a3a88c7
56f603a
04cab66
3a6ea4f
7b9d97b
aca19ec
6b998e7
49e27b6
360576e
571eb7e
cb731ee
4e1e7d0
8fd40d0
57d9a78
c5c17e8
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,48 @@ | ||
| name: Kotlin PR Review | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: [opened, reopened, synchronize] | ||
|
|
||
| jobs: | ||
| kotlin_review: | ||
| runs-on: code-review # ← matches the label you gave your runner | ||
|
|
||
| timeout-minutes: 15 | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 # full history needed for git diff | ||
|
|
||
| - name: Run Kotlin Review Agent | ||
| env: | ||
| PLATFORM: github | ||
| REVIEWER_TOKEN: ${{ secrets.REVIEWER_TOKEN }} | ||
| OLLAMA_HOST: ${{ secrets.OLLAMA_HOST }} | ||
| OLLAMA_MODEL: ${{ secrets.OLLAMA_MODEL }} | ||
| # Map GitHub context vars to the names review_ci.py expects | ||
| CI_PROJECT_DIR: ${{ github.workspace }} | ||
| CI_PROJECT_ID: ${{ github.repository }} # e.g. hemusimple/AndroidVideoMotion | ||
| CI_MERGE_REQUEST_IID: ${{ github.event.pull_request.number }} | ||
| CI_MERGE_REQUEST_TARGET_BRANCH_NAME: ${{ github.event.pull_request.base.ref }} | ||
| CI_MERGE_REQUEST_SOURCE_BRANCH_NAME: ${{ github.event.pull_request.head.ref }} | ||
| CI_MERGE_REQUEST_TITLE: ${{ github.event.pull_request.title }} | ||
| CI_COMMIT_AUTHOR: ${{ github.event.pull_request.user.login }} | ||
|
|
||
| run: | | ||
| call D:\AIML\code-reviewer\myvenv\Scripts\activate.bat | ||
| pip install -q httpx python-dotenv pydantic pydantic-settings ollama loguru tenacity | ||
| python D:\AIML\code-reviewer\review_ci.py | ||
| exit 0 | ||
| shell: cmd | ||
|
|
||
|
|
||
| - name: Upload review log | ||
| uses: actions/upload-artifact@v4 | ||
| if: always() | ||
| with: | ||
| name: review-output | ||
| path: review_output.log | ||
| retention-days: 7 | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -4,6 +4,7 @@ import android.content.Context | |||||||||||||
| import android.content.Intent | ||||||||||||||
| import android.os.Build | ||||||||||||||
| import android.os.Bundle | ||||||||||||||
| import android.util.Log | ||||||||||||||
| import com.google.android.material.dialog.MaterialAlertDialogBuilder | ||||||||||||||
| import com.tejpratapsingh.lyricsmaker.data.lrc.SyncedLyricFrame | ||||||||||||||
| import com.tejpratapsingh.lyricsmaker.presentation.motion.getLyricsVideoProducer | ||||||||||||||
|
|
@@ -31,6 +32,7 @@ class LyricsActivity : PreviewActivity() { | |||||||||||||
| lyrics: ArrayList<SyncedLyricFrame>, | ||||||||||||||
| socialMeta: SocialMeta? = null, | ||||||||||||||
| ) { | ||||||||||||||
| Log.d(TAG,"start") | ||||||||||||||
|
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. |
||||||||||||||
| context.startActivity( | ||||||||||||||
| Intent(context, LyricsActivity::class.java).also { | ||||||||||||||
| it.putExtra(SONG, song) | ||||||||||||||
|
|
@@ -41,6 +43,7 @@ class LyricsActivity : PreviewActivity() { | |||||||||||||
| } | ||||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
|
|
||||||||||||||
| private val song: String | ||||||||||||||
| get() = intent.getStringExtra(SONG) ?: "" | ||||||||||||||
|
|
||||||||||||||
|
|
@@ -71,7 +74,8 @@ class LyricsActivity : PreviewActivity() { | |||||||||||||
|
|
||||||||||||||
| override fun onCreate(savedInstanceState: Bundle?) { | ||||||||||||||
| super.onCreate(savedInstanceState) | ||||||||||||||
|
|
||||||||||||||
| Log.d("LyricsActivity","onCreate") | ||||||||||||||
|
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.
Suggested change
|
||||||||||||||
| val data = getdata() | ||||||||||||||
|
Comment on lines
+77
to
+78
Contributor
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. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Verify whether `getdata()` actually exists anywhere and compare with `getData()`.
# Expected:
# - call-site(s) for getdata(...)
# - no definition for fun getdata(...) (if mismatch is real)
# - definition for fun getData(...)
rg -nP --type=kt '\bgetdata\s*\('
rg -nP --type=kt '\bfun\s+getdata\s*\('
rg -nP --type=kt '\bfun\s+getData\s*\('Repository: tejpratap46/AndroidVideoMotion Length of output: 154 🏁 Script executed: #!/bin/bash
# Search for both method variants using glob patterns
echo "=== Searching for getdata() calls ==="
rg -nP '\.getdata\s*\(' --glob='*.kt'
echo -e "\n=== Searching for getData() calls ==="
rg -nP '\.getData\s*\(' --glob='*.kt'
echo -e "\n=== Searching for getdata() definitions ==="
rg -nP 'fun\s+getdata\s*\(' --glob='*.kt'
echo -e "\n=== Searching for getData() definitions ==="
rg -nP 'fun\s+getData\s*\(' --glob='*.kt'
echo -e "\n=== Reading LyricsActivity.kt to check line 77 and 105 ==="
if [ -f "modules/lyrics-maker/src/main/java/com/tejpratapsingh/lyricsmaker/presentation/activity/LyricsActivity.kt" ]; then
echo "File found. Showing lines 70-110:"
sed -n '70,110p' "modules/lyrics-maker/src/main/java/com/tejpratapsingh/lyricsmaker/presentation/activity/LyricsActivity.kt" | cat -n
else
echo "File not found at expected path. Searching for LyricsActivity.kt..."
fd -e kt -i 'lyricsactivity'
fiRepository: tejpratap46/AndroidVideoMotion Length of output: 2058 Fix method name mismatch: Line 77 calls ✅ Suggested fix- Log.d("LyricsActivity","onCreate")
- val data = getdata()
+ Log.d(TAG, "onCreate")
+ val data = getData()🤖 Prompt for AI Agents |
||||||||||||||
| val start = lyrics.minBy { it.frame }.frame | ||||||||||||||
| val end = lyrics.maxBy { it.frame }.frame | ||||||||||||||
|
|
||||||||||||||
|
|
@@ -98,4 +102,6 @@ class LyricsActivity : PreviewActivity() { | |||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
| override fun getMotionVideo(): MotionVideoProducer = video | ||||||||||||||
|
|
||||||||||||||
| fun getData() = "user data".toString() | ||||||||||||||
| } | ||||||||||||||
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.
🧩 Analysis chain
🏁 Script executed:
Repository: tejpratap46/AndroidVideoMotion
Length of output: 1461
🏁 Script executed:
# Get the full kotlin-review.yml to see artifact upload section (lines 40-46) cat .github/workflows/kotlin-review.ymlRepository: tejpratap46/AndroidVideoMotion
Length of output: 1724
🏁 Script executed:
# Search for review_ci.py in the repository fd review_ci.pyRepository: tejpratap46/AndroidVideoMotion
Length of output: 56
Redact secret-bearing output before uploading the log artifact.
The workflow passes secrets (REVIEWER_TOKEN, OLLAMA_HOST, OLLAMA_MODEL) into the review process environment, then pipes raw stdout/stderr to
review_output.logand uploads it withif: always()(lines 40-46). GitHub's console log masking does not protect artifact files. Since the externalreview_ci.pyscript (not in this repository) could print environment variables, configuration, or HTTP headers, the artifact can persist values that would otherwise be masked in console logs.🔒 Suggested hardening
run: | pip install -q httpx python-dotenv pydantic pydantic-settings ollama loguru tenacity - python D:\AIML\code-reviewer\review_ci.py 2>&1 | Tee-Object -FilePath review_output.log + $output = & python D:\AIML\code-reviewer\review_ci.py 2>&1 + $exitCode = $LASTEXITCODE + $secrets = @($env:REVIEWER_TOKEN, $env:OLLAMA_HOST, $env:OLLAMA_MODEL) | + Where-Object { -not [string]::IsNullOrWhiteSpace($_) } + $output | + ForEach-Object { + $line = [string]$_ + foreach ($secret in $secrets) { + $line = $line.Replace($secret, '***') + } + $line + } | + Tee-Object -FilePath review_output.log + exit $exitCode🤖 Prompt for AI Agents