Skip to content

Conversation

techy4shri
Copy link
Contributor

@techy4shri techy4shri commented Apr 21, 2025

πŸ“‹ Description

JIRA ID: issue link

Updated the depreceated version of codeql and java in github action sast.yml file for correct check passes.


βœ… Type of Change

  • 🐞 Bug fix (non-breaking change which resolves an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • πŸ”₯ Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • πŸ›  Refactor (change that is neither a fix nor a new feature)
  • βš™οΈ Config change (configuration file or build script updates)
  • πŸ“š Documentation (updates to docs or readme)
  • πŸ§ͺ Tests (adding new or updating existing tests)
  • 🎨 UI/UX (changes that affect the user interface)
  • πŸš€ Performance (improves performance)
  • 🧹 Chore (miscellaneous changes that don't modify src or test files)

ℹ️ Additional Information

Please describe how the changes were tested, and include any relevant screenshots, logs, or other information that provides additional context.

Summary by CodeRabbit

  • Chores
    • Updated GitHub Actions workflows to use the latest versions of Java setup and CodeQL actions, improving compatibility and reliability for automated builds and static analysis. No impact on application features or user experience.
  • Documentation
    • Added a "Prerequisites" section to the README outlining required software versions for development setup.

Copy link
Contributor

coderabbitai bot commented Apr 21, 2025

Walkthrough

The changes update three GitHub Actions workflow files to use newer versions of their respective actions. The build-on-pull-request.yml and package.yml workflows now use version 4 of the actions/setup-java action and switch the Java distribution from adopt to temurin. The sast.yml workflow updates both the CodeQL actions (init and analyze) from version 2 to 3, upgrades the Java setup action to version 4 with the same distribution change, and explicitly specifies the languages input for CodeQL initialization. No modifications were made to workflow logic, steps, or exported/public entities.

Changes

File(s) Change Summary
.github/workflows/build-on-pull-request.yml, .github/workflows/package.yml Upgraded actions/setup-java from v2 to v4; changed Java distribution from adopt to temurin.
.github/workflows/sast.yml Upgraded github/codeql-action/init and analyze from v2 to v3; upgraded actions/setup-java to v4 with temurin; explicitly specified languages input for CodeQL init.
README.md Added a "Prerequisites" section listing required software versions: JDK 17, Maven, Springboot V2, and MySQL.

Possibly related PRs

Suggested reviewers

  • drtechie

Poem

A hop and a skip through workflows anew,
Java’s fresh brew, now version four too!
CodeQL’s sharper, with v3 in the queue,
Temurin’s the flavor, in pipelines we grew.
With actions updated, our CI will gleamβ€”
A rabbit’s delight in a developer’s dream!
πŸ‡βœ¨


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.

❀️ Share
πŸͺ§ Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@techy4shri
Copy link
Contributor Author

@drtechie @Sneha6003 can you approve the workflow to check if they pass or not? Is the CodeQL supposed to be behind an approval?

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

πŸ“œ Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 6af44ba and 8493164.

πŸ“’ Files selected for processing (2)
  • .github/workflows/build-on-pull-request.yml (1 hunks)
  • .github/workflows/sast.yml (1 hunks)
🧰 Additional context used
πŸͺ› YAMLlint (1.35.1)
.github/workflows/sast.yml

[warning] 45-45: wrong indentation: expected 8 but found 10

(indentation)


[error] 47-47: trailing spaces

(trailing-spaces)

πŸ”‡ Additional comments (2)
.github/workflows/sast.yml (2)

38-41: Upgraded CodeQL init action is correct

The transition from github/codeql-action/init@v2 to @v3, along with explicit languages: ${{ matrix.language }}, aligns with CodeQL documentation and ensures the correct languages are scanned.


51-55: Updated CodeQL analyze action is correct

The upgrade to github/codeql-action/analyze@v3 preserves the intended category input. No further changes are necessary.

Copy link

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
.github/workflows/sast.yml (1)

30-32: Optional Improvement: Add full clone for CodeQL
For optimal CodeQL analysis (including incremental builds and more accurate blame tracing), it’s recommended to perform a full checkout. You can add fetch-depth: 0 to the checkout step as shown:

       - name: Checkout code
-        uses: actions/checkout@v3
-        with:
+        uses: actions/checkout@v3
+        with:
+          fetch-depth: 0
           ref: ${{ github.event.pull_request.head.ref }}
           repository: ${{ github.event.pull_request.head.repo.full_name }}
🧰 Tools
πŸͺ› actionlint (1.7.4)

31-31: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

πŸ“œ Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 8ee1a11 and eed8215.

πŸ“’ Files selected for processing (3)
  • .github/workflows/package.yml (1 hunks)
  • .github/workflows/sast.yml (2 hunks)
  • README.md (1 hunks)
βœ… Files skipped from review due to trivial changes (1)
  • README.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/package.yml
🧰 Additional context used
πŸͺ› actionlint (1.7.4)
.github/workflows/sast.yml

31-31: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

πŸ”‡ Additional comments (7)
.github/workflows/sast.yml (7)

7-7: Approve: Excluding target/** from CodeQL scan
Ignoring the target/ directory under the push trigger reduces noise and speeds up analysis. This pattern is consistent with other workflows in the repo.


12-12: Approve: Excluding target/** on pull requests
Matching the push configuration, skipping build artifacts in PR runs prevents unnecessary scanning.


28-28: Skip: Blank line insertion
This is a formatting-only change (empty line) and doesn’t impact the workflow’s behavior.


36-39: Approve: Upgraded CodeQL init action
Switching to github/codeql-action/init@v3 and explicitly passing languages: ${{ matrix.language }} aligns with the latest CodeQL setup requirements.


41-46: Approve: Updated Java setup to actions/setup-java@v4
Upgrading to actions/setup-java@v4 with java-version: 17 and the temurin distribution ensures a supported JDK and matches other CI workflows in the repo.


47-49: Skip: Build step formatting
This Maven build step remains functionally identical; only minor whitespace or indentation changed.


50-53: Approve: Upgraded CodeQL analyze action
Updating to github/codeql-action/analyze@v3 with category: "/language:${{ matrix.language }}" follows the latest action recommendations and preserves language-specific grouping.

@drtechie drtechie merged commit 4254581 into PSMRI:develop Apr 21, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants