Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/kotlin-review.yml
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
Expand Up @@ -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
Expand Down Expand Up @@ -31,6 +32,7 @@ class LyricsActivity : PreviewActivity() {
lyrics: ArrayList<SyncedLyricFrame>,
socialMeta: SocialMeta? = null,
) {
Log.d(TAG,"start")
context.startActivity(
Intent(context, LyricsActivity::class.java).also {
it.putExtra(SONG, song)
Expand All @@ -41,6 +43,7 @@ class LyricsActivity : PreviewActivity() {
}
}


private val song: String
get() = intent.getStringExtra(SONG) ?: ""

Expand Down Expand Up @@ -71,7 +74,8 @@ class LyricsActivity : PreviewActivity() {

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)

Log.d("LyricsActivity","onCreate")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For consistency and better maintainability, use the TAG constant defined in the companion object instead of a hardcoded string literal. This ensures that the log tag remains uniform across the class and is easier to update if needed. Also, added a space after the comma for better readability.

Suggested change
Log.d("LyricsActivity","onCreate")
Log.d(TAG, "onCreate")

val data = getdata()
val start = lyrics.minBy { it.frame }.frame
val end = lyrics.maxBy { it.frame }.frame

Expand All @@ -98,4 +102,6 @@ class LyricsActivity : PreviewActivity() {
}

override fun getMotionVideo(): MotionVideoProducer = video

fun getData() = "user data".toString()
}
Loading