Skip to content

Codeowners, codeql and stable-pr#25

Merged
Thaleszh merged 1 commit into
mainfrom
feat/stale-pr
Aug 4, 2025
Merged

Codeowners, codeql and stable-pr#25
Thaleszh merged 1 commit into
mainfrom
feat/stale-pr

Conversation

@nayrukii

@nayrukii nayrukii commented Aug 1, 2025

Copy link
Copy Markdown

Description

This PR adds configuration updates to improve repository quality and security:

  • Adds a CODEOWNERS file assigning @jhelison as the maintainer.
  • Adds a stale-pr.yml workflow to automatically mark and close stale issues and pull requests.
  • Adds a codeql.yml workflow to enable automated code scanning for security vulnerabilities.

These changes are part of the repository hardening efforts to ensure proper review assignment, automated cleanup of old contributions, and vulnerability detection.

Type of change

Please delete options that are not relevant.

  • chore (Updates on dependencies, gitignore, etc)

How Has This Been Tested?

These are configuration-level changes and do not affect runtime code directly.

  • Verified the syntax of CODEOWNERS.
  • Reused the stale-pr.yml and codeql.yml workflows from the working setup in kiijs-sdk.
  • Confirmed both workflows follow GitHub Actions documentation.

No unit or integration tests are required for this PR.

@coderabbitai

coderabbitai Bot commented Aug 1, 2025

Copy link
Copy Markdown

Walkthrough

Three new configuration files have been introduced in the repository. A .github/CODEOWNERS file now assigns @jhelison as the code owner for all repository files. Two GitHub Actions workflow files have been added: codeql.yml sets up CodeQL analysis to run on pushes and pull requests to the main branch, and stale-pr.yml schedules an automated job to manage stale pull requests daily using the actions/stale action. No changes to application code or exported/public entities are present.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~7 minutes

  • Complexity: Simple configuration additions with minor logic in workflow setup.
  • Review involves verifying the correctness of CODEOWNERS assignment and the intended behavior of the two workflow files, including their triggers and parameters.

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/stale-pr

🪧 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.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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 generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests 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.

@nayrukii nayrukii changed the title Codeowners, codesl and stable-pr Codeowners, codeql and stable-pr Aug 1, 2025
@github-advanced-security

Copy link
Copy Markdown

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (6)
.github/CODEOWNERS (1)

1-1: Terminate the file with a newline character

Some linters and diff viewers complain when the last line of a text file is not newline-terminated.
Add an empty line at the end to keep tooling quiet and stay consistent with POSIX text-file conventions.

 * @jhelison
+
.github/workflows/stale-pr.yml (2)

4-5: Strip trailing whitespace

Lines 4–5 contain trailing spaces flagged by YAML-lint. While harmless to the runner, they create noisy diffs and can break “fail-on-lint” pipelines.

-    - cron: '30 1 * * *'␠␠
+    - cron: '30 1 * * *'

14-14: Add a terminating newline

Ends-with-newline keeps YAML-lint quiet and matches repository style.

   repo-token: ${{ secrets.GITHUB_TOKEN }}
+
.github/workflows/codeql.yml (3)

9-15: Fix indentation to silence YAML-lint

security-events and packages should be indented two spaces under permissions:.

 permissions:
-    security-events: write
-
-    packages: read
+  security-events: write
+  packages: read

16-24: Specify analyzed languages explicitly

Without languages: CodeQL defaults can be surprising and may skip analysis if no recognized code is present at checkout time.

   analyze:
     runs-on: ubuntu-latest
     steps:
       - uses: actions/checkout@v4
       - name: Initialize CodeQL
         uses: github/codeql-action/init@v3
+        with:
+          languages: python, javascript   # <-- adjust to repo languages

24-24: Terminate file with newline

Add a final newline to satisfy linters.

       uses: github/codeql-action/analyze@v3
+
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 7af0e6d and 6ec4b84.

📒 Files selected for processing (3)
  • .github/CODEOWNERS (1 hunks)
  • .github/workflows/codeql.yml (1 hunks)
  • .github/workflows/stale-pr.yml (1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.7)
.github/workflows/codeql.yml

22-22: the runner of "github/codeql-action/init@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


24-24: the runner of "github/codeql-action/analyze@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🪛 YAMLlint (1.37.1)
.github/workflows/codeql.yml

[warning] 11-11: wrong indentation: expected 2 but found 4

(indentation)


[error] 24-24: no new line character at the end of file

(new-line-at-end-of-file)

.github/workflows/stale-pr.yml

[error] 4-4: trailing spaces

(trailing-spaces)


[error] 5-5: trailing spaces

(trailing-spaces)


[error] 14-14: no new line character at the end of file

(new-line-at-end-of-file)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: analyze
🔇 Additional comments (1)
.github/workflows/stale-pr.yml (1)

11-14: Clarify stale-bot configuration

Only days-before-issue-stale is set (-1 disables issues).
If the intent is to mark/close pull requests, you probably want to set the PR-specific keys; otherwise the workflow will keep the default 30-day behaviour.

       with:
         days-before-issue-stale: -1   # keep issues untouched
+        days-before-pr-stale: 14      # mark PRs stale after 14 days
+        days-before-pr-close: 7       # close 7 days after being marked

Double-check the numbers align with your policy.

Comment on lines +20 to +24
- uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2 No newline at end of file

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue

Upgrade CodeQL action to v3 (Node 20) before v2 deprecation

actionlint warns that github/codeql-action@v2 relies on Node 16, which will be removed from GitHub-Hosted runners shortly.
Switching to v3 avoids imminent build failures.

-    - name: Initialize CodeQL
-      uses: github/codeql-action/init@v2
+    - name: Initialize CodeQL
+      uses: github/codeql-action/init@v3
@@
-    - name: Perform CodeQL Analysis
-      uses: github/codeql-action/analyze@v2
+    - name: Perform CodeQL Analysis
+      uses: github/codeql-action/analyze@v3
📝 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.

Suggested change
- uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
- uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
🧰 Tools
🪛 actionlint (1.7.7)

22-22: the runner of "github/codeql-action/init@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


24-24: the runner of "github/codeql-action/analyze@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🪛 YAMLlint (1.37.1)

[error] 24-24: no new line character at the end of file

(new-line-at-end-of-file)

🤖 Prompt for AI Agents
In .github/workflows/codeql.yml around lines 20 to 24, the CodeQL GitHub Actions
are using version v2, which relies on Node 16 and will soon be deprecated.
Update the uses of github/codeql-action/init and github/codeql-action/analyze
from v2 to v3 to ensure compatibility with Node 20 and prevent build failures.

@Thaleszh Thaleszh merged commit ca228fa into main Aug 4, 2025
6 checks passed
@Thaleszh Thaleszh deleted the feat/stale-pr branch August 4, 2025 13:28
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.

4 participants