Skip to content

ci: 新增对dependabot的阿里云依赖检查 #2126

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

Merged
merged 5 commits into from
May 3, 2025
Merged

Conversation

unknowIfGuestInDream
Copy link
Owner

@unknowIfGuestInDream unknowIfGuestInDream commented May 3, 2025

Close #2125

Fixes #

Proposed Changes

  1. ...
  2. ...
  3. ...

Readiness Checklist

Author/Contributor

  • If documentation is needed for this change, has that been included in this pull request

Reviewing Maintainer

  • Label as either enhancement, bug, documentation or dependencies
  • Verify design and implementation

Summary by Sourcery

Add a GitHub Actions workflow to check Dependabot dependency availability on Aliyun Maven repository

New Features:

  • Implement automated checking of dependency availability for Dependabot pull requests

CI:

  • Create a workflow that checks newly added dependencies against Aliyun Maven repository for Dependabot PRs

Summary by CodeRabbit

  • 新功能
    • 新增 GitHub Actions 工作流,用于在拉取请求中自动检查新增依赖是否可在阿里云 Maven 仓库获取,并在 PR 下方评论反馈检查结果。

Close #2125

Signed-off-by: unknowIfGuestInDream <liang.tang.cx@gmail.com>
Copy link

Thank you for following naming conventions! 😻

Copy link

sourcery-ai bot commented May 3, 2025

Reviewer's Guide

This pull request introduces a new GitHub Actions workflow designed to automatically check if dependencies added or updated by Dependabot are available in the Aliyun public Maven repository. The workflow triggers on Dependabot pull requests, extracts dependency changes from the diff of build.gradle or pom.xml files, queries the Aliyun Maven repository URL for each new dependency, and posts the availability results as a comment on the pull request.

Sequence diagram for Aliyun dependency check workflow

sequenceDiagram
    participant GA as GitHub Actions
    participant Script as Check Script
    participant Git as Git Repository
    participant Aliyun as Aliyun Maven Repo
    participant GitHubAPI as GitHub API

    Note over GA: Triggered by Dependabot PR
    GA->>Git: Checkout PR code
    GA->>Script: Run dependency check script
    Script->>Git: Get diff (build.gradle/pom.xml)
    Script->>Script: Parse added dependencies
    loop For each added dependency
        Script->>Aliyun: Check if dependency POM exists (curl)
        Aliyun-->>Script: HTTP Status Code (e.g., 200)
    end
    Script->>Script: Format results
    Script->>GitHubAPI: Create PR comment with results
    GitHubAPI-->>Script: Comment created
    Script-->>GA: Output results/status
Loading

File-Level Changes

Change Details Files
Added a GitHub Actions workflow to verify Dependabot dependency updates against the Aliyun Maven repository.
  • Configured the workflow to trigger only for pull requests opened or synchronized by 'dependabot[bot]'.
  • Added a script step using actions/github-script to parse added dependencies from build.gradle or pom.xml diffs.
  • Implemented logic within the script to check the existence of each added dependency artifact in the Aliyun Maven repository using curl.
  • Added functionality to post the check results (availability status for each dependency) as a comment on the triggering pull request.
.github/workflows/check-aliyun-maven.yml

Assessment against linked issues

Issue Objective Addressed Explanation
#2125 Create a GitHub Action that checks if a dependabot's updated dependencies in a pull request exist in the Aliyun Maven repository.
#2125 The GitHub Action should post a comment on the pull request indicating whether each dependency is available in the Aliyun Maven repository.

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

vercel bot commented May 3, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
javafx-tool ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 3, 2025 1:13am

Copy link

quine-bot bot commented May 3, 2025

👋 Figuring out if a PR is useful is hard, hopefully this will help.

  • @unknowIfGuestInDream has been on GitHub since 2019 and in that time has had 1223 public PRs merged
  • Don't you recognize them? They've been here before 🎉
  • Here's a good example of their work: javafxTool (Javafx scaffolding, built on JDK17 + JavaFX21 + controlsfx 11.x.x + Maven)
  • From looking at their profile, they seem to be good with Java and HTML.

Their most recently public accepted PR is: #2123

Copy link

coderabbitai bot commented May 3, 2025

Warning

Rate limit exceeded

@unknowIfGuestInDream has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 11 minutes and 29 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 1db86fe and c4f92b5.

📒 Files selected for processing (1)
  • .github/workflows/check-aliyun-maven.yml (1 hunks)

"""

Walkthrough

本次变更新增了一个 GitHub Actions 工作流文件 .github/workflows/check-aliyun-maven.yml,用于在 Dependabot 发起的依赖更新 Pull Request 上,自动检测 PR 新增的依赖项是否已存在于阿里云 Maven 公共仓库。该工作流会在 PR 创建或同步时触发,仅对 Dependabot 账号生效。流程包括拉取代码、设置 Java 环境、对比依赖文件变更、检测新增依赖在阿里云 Maven 的可用性,并将检测结果以评论形式反馈到 PR。

Changes

文件路径/分组 变更摘要
.github/workflows/check-aliyun-maven.yml 新增 GitHub Actions 工作流,自动检测 PR 新增依赖在阿里云 Maven 的可用性,并反馈结果。

Sequence Diagram(s)

sequenceDiagram
    participant GitHub PR
    participant GitHub Actions
    participant Dependabot
    participant Aliyun Maven

    Dependabot->>GitHub PR: 创建/同步依赖更新 PR
    GitHub PR->>GitHub Actions: 触发 check-aliyun-maven.yml
    GitHub Actions->>GitHub Actions: 检查 actor 是否为 Dependabot
    GitHub Actions->>GitHub Actions: 检出 PR 代码
    GitHub Actions->>GitHub Actions: 设置 Java 17 环境
    GitHub Actions->>GitHub Actions: 解析依赖变更
    loop 对每个新增依赖
        GitHub Actions->>Aliyun Maven: 发送 HEAD 请求检测依赖
        Aliyun Maven-->>GitHub Actions: 返回 HTTP 状态
    end
    GitHub Actions->>GitHub PR: 评论检测结果
Loading

Assessment against linked issues

Objective Addressed Explanation
检查 Dependabot PR 新增依赖是否存在于阿里云 Maven 仓库 (#2125)

Suggested labels

size/M

Poem

🐇
依赖更新轻轻来,
阿里云中寻踪迹。
自动检测不遗漏,
PR 评论报平安。
小兔跳跃代码间,
构建顺利乐开怀!
🥕✨

"""


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.

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 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.

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @unknowIfGuestInDream - I've reviewed your changes - here's some feedback:

  • Using pull_request_target combined with checking out the PR's head ref requires careful security review; consider if the pull_request trigger could be used instead.
  • Relying on regex to parse dependency changes from a git diff might be fragile; consider using build tool introspection or dedicated dependency analysis tools.
  • Consider replacing the curl execution with native Node.js HTTP requests for potentially better error handling and avoiding shell dependencies.
Here's what I looked at during the review
  • 🟡 General issues: 2 issues found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Contributor

github-actions bot commented May 3, 2025

Qodana Community for JVM

It seems all right 👌

No new problems were found according to the checks applied

💡 Qodana analysis was run in the pull request mode: only the changed files were checked
☁️ View the detailed Qodana report

Contact Qodana team

Contact us at qodana-support@jetbrains.com

Copy link

@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: 3

🧹 Nitpick comments (6)
.github/workflows/check-aliyun-maven.yml (6)

3-6: 审查触发器配置
使用 pull_request_target 事件有权限提升风险,虽然通过 job-level if 限制了 actor 必须为 Dependabot,但仍建议显式声明最小权限集,例如:

permissions:
  pull-requests: write
  contents: read

10-12: 确保仅在 Dependabot PR 上运行
if: github.actor == 'dependabot[bot]' 能防止其它用户触发此作业。建议在作业注释中说明跳过原因,或在运行日志中加入提示,便于维护排查。


37-41: 优化依赖变更检测范围
当前仅针对 build.gradlepom.xml 逐一 diff,且不支持 Kotlin DSL (build.gradle.kts)。建议一次性匹配多文件或新增 Kotlin 支持:

- git diff origin/${{ github.event.pull_request.base.ref }} -- build.gradle || git diff origin/${{ github.event.pull_request.base.ref }} -- pom.xml
+ git diff origin/${{ github.event.pull_request.base.ref }} -- '*.gradle*' 'pom.xml'

70-75: 减少子进程开销
每个依赖调用 curl 会启动大量子进程,建议使用 JavaScript 原生 HTTP 库(如 axios)发送 HEAD 请求并检查响应状态,以降低 I/O 负载并提高可维护性。


81-88: 增强评论创建的鲁棒性

  • 未显式声明 workflow 的 permissions,可导致部分仓库默认权限不足。
  • 建议为 octokit.rest.issues.createComment 添加 try/catch,捕获并记录评论创建失败的场景,避免整个脚本异常中止。

95-96: 优化结果输出方式
当前仅 echo 输出,若需后续自动化采集或聚合,可考虑上传为 Artifact 或在 GitHub Checks 界面展示。

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 7365957 and d33c9f3.

📒 Files selected for processing (1)
  • .github/workflows/check-aliyun-maven.yml (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (9)
  • GitHub Check: build (17, windows-latest, false)
  • GitHub Check: build (21, windows-latest, false)
  • GitHub Check: build (21, macos-latest, false)
  • GitHub Check: build (17, ubuntu-latest, false)
  • GitHub Check: build (21, ubuntu-latest, false)
  • GitHub Check: build (17, macos-latest, false)
  • GitHub Check: qodana
  • GitHub Check: StepSecurity Harden-Runner
  • GitHub Check: Summary

Close #2125

Signed-off-by: unknowIfGuestInDream <liang.tang.cx@gmail.com>
Copy link

@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: 1

♻️ Duplicate comments (3)
.github/workflows/check-aliyun-maven.yml (3)

76-80: 使用 HTTP 客户端替代 Shell 调用以增强健壮性
当前通过 curl | grep 判断状态码,易受命令行环境影响且难以捕获网络错误。先前已有相同建议:

推荐使用内置 fetch(或安装 node-fetch@actions/http-client):

const response = await fetch(pomUrl, { method: 'HEAD' });
if (response.ok) {
  results.push(`✅ ${dep.group}:${dep.artifact}:${dep.version} - 可用`);
} else {
  results.push(`❌ ${dep.group}:${dep.artifact}:${dep.version} - 不可用`);
}

这样能够更精确地捕获 HTTP 状态及网络异常。


21-25: 🛠️ Refactor suggestion

增加 fetch-depth 以确保 base 分支代码可对比
正如先前评论中提到的,默认 actions/checkout@v4 仅拉取单个提交,git diff origin/${{ github.event.pull_request.base.ref }} 将找不到 base 分支。

- uses: actions/checkout@v4
+ uses: actions/checkout@v4
  with:
+   fetch-depth: 0

这样可以完整拉取历史,并保证后续 diff 能正确运行。


45-52: 🛠️ Refactor suggestion

扩展依赖解析以支持 Maven pom.xml
当前正则仅匹配 Gradle Groovy DSL,无法解析 <dependency> 标签。先前已有类似建议:

可在检测到 pom.xml 时引入 XML 解析库(如 xml2jsfast-xml-parser),例如:

+ const xml2js = require('xml2js');+ if (diffOutput.includes('<dependency>')) {
+   const parsed = await xml2js.parseStringPromise(diffOutput);
+   // 从 parsed.project.dependencies[0].dependency 中提取 groupId/artifactId/version
+ } else {
    // 现有 Gradle 正则逻辑
+ }

这样能保证对 Gradle 与 Maven 两种构建文件都能正确提取新增依赖。

🧹 Nitpick comments (2)
.github/workflows/check-aliyun-maven.yml (2)

17-18: 验证 Dependabot 账号匹配精准度
当前写法仅匹配 dependabot[bot],若将来 Dependabot 账号名称变更或使用了 dependabot-preview[bot],可能导致工作流未运行。建议使用更宽松的匹配方式,或者在脚本开头打印 ${{ github.actor }} 并手动验证,确保所有 Dependabot 触发场景都被覆盖。


43-44: 合并或分步获取多个文件的 diff 输出
当前使用 || 只会返回第一个命令的结果,若 build.gradle 和 pom.xml 同时更新,只有 build.gradle 的变更会被检查。建议改为一次性对两个文件做 diff 并合并结果,例如:

- const diffOutput = execSync('git diff origin/${{ github.event.pull_request.base.ref }} -- build.gradle || git diff origin/${{ github.event.pull_request.base.ref }} -- pom.xml').toString();
+ const diffGradle = execSync('git diff origin/${{ github.event.pull_request.base.ref }} -- build.gradle').toString();
+ const diffPom = execSync('git diff origin/${{ github.event.pull_request.base.ref }} -- pom.xml').toString();
+ const diffOutput = diffGradle + diffPom;

或使用路径通配符:

git diff origin/${{ github.event.pull_request.base.ref }} -- '*.gradle' 'pom.xml'
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between d33c9f3 and 6fa79f0.

📒 Files selected for processing (1)
  • .github/workflows/check-aliyun-maven.yml (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (8)
  • GitHub Check: build (21, macos-latest, false)
  • GitHub Check: build (21, windows-latest, false)
  • GitHub Check: build (21, ubuntu-latest, false)
  • GitHub Check: build (17, windows-latest, false)
  • GitHub Check: build (17, ubuntu-latest, false)
  • GitHub Check: build (17, macos-latest, false)
  • GitHub Check: StepSecurity Harden-Runner
  • GitHub Check: Summary

Close #2125

Signed-off-by: unknowIfGuestInDream <liang.tang.cx@gmail.com>
Copy link

@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: 3

🧹 Nitpick comments (3)
.github/workflows/check-aliyun-maven.yml (3)

19-23: 添加 fetch-depth 以获取完整历史
默认 actions/checkout@v4 只拉取单个提交,后续 git diff origin/${{ github.event.pull_request.base.ref }} 可能因未拉取 base 分支而失败。建议:

- uses: actions/checkout@v4
  with:
    ref: ${{ github.event.pull_request.head.ref }}
+   fetch-depth: 0

120-120: 升级 actions/github-script 版本
当前使用 actions/github-script@v6,建议升级到至少 @v7,以获得更好的功能支持和最新安全修复:

- uses: actions/github-script@v6
+ uses: actions/github-script@v7
🧰 Tools
🪛 actionlint (1.7.4)

120-120: the runner of "actions/github-script@v6" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


136-142: 优化 HTTP 可用性检测实现
使用 curl | grep 的方式较为脆弱,可考虑直接使用内置或轻量级 HTTP 客户端(如 node-fetch)发起 HEAD 请求,便于获取状态码并统一处理异常:

try {
  const response = await fetch(pomUrl, { method: 'HEAD' });
  results.push(response.ok
    ? `✅ ${dep.group}:${dep.artifact}:${dep.version} - 可用`
    : `❌ ${dep.group}:${dep.artifact}:${dep.version} - 不可用`);
} catch {
  results.push(`❌ ${dep.group}:${dep.artifact}:${dep.version} - 不可用`);
}
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 6fa79f0 and f5c1fcf.

📒 Files selected for processing (1)
  • .github/workflows/check-aliyun-maven.yml (1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.4)
.github/workflows/check-aliyun-maven.yml

53-53: property "detect-build" is not defined in object type {get-changes: {conclusion: string; outcome: string; outputs: {string => string}}}

(expression)


120-120: the runner of "actions/github-script@v6" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

⏰ Context from checks skipped due to timeout of 90000ms (8)
  • GitHub Check: build (21, macos-latest, false)
  • GitHub Check: build (21, ubuntu-latest, false)
  • GitHub Check: build (17, windows-latest, false)
  • GitHub Check: build (17, ubuntu-latest, false)
  • GitHub Check: build (21, windows-latest, false)
  • GitHub Check: build (17, macos-latest, false)
  • GitHub Check: StepSecurity Harden-Runner
  • GitHub Check: Summary

Close #2125

Signed-off-by: unknowIfGuestInDream <liang.tang.cx@gmail.com>
Copy link

@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: 1

♻️ Duplicate comments (2)
.github/workflows/check-aliyun-maven.yml (2)

19-23: 补充 fetch-depth 以获取完整历史
默认 actions/checkout@v4 只拉取单提交,后续 git diff origin/... 可能找不到基准分支。建议增加:

- uses: actions/checkout@v4
  with:
    ref: ${{ github.event.pull_request.head.ref }}
+   fetch-depth: 0

136-141: 替换 curl | grep,使用内置 HTTP 客户端
Shell 调用 curl + grep 较脆弱,建议在脚本中使用 fetch(或 node-fetch)发起 HEAD 请求并检查 response.ok,提高稳定性与可读性。

🧹 Nitpick comments (3)
.github/workflows/check-aliyun-maven.yml (3)

61-67: 支持 Gradle Kotlin DSL 和更灵活的依赖声明解析
当前正则仅覆盖 Groovy DSL (implementation '...' 等),无法匹配 implementation("group:artifact:version")build.gradle.kts 文件。可考虑:

  • 拓展正则支持双引号和括号写法
  • 单独检测 .kts 文件或使用 AST 工具解析

85-108: 增强 Maven 依赖块解析的健壮性
手工按行匹配 <dependency> 标签较为脆弱,建议:

  • 使用 XML 解析库(如 xml2jsfast-xml-parser)处理 pom.xml
  • 或者在匹配前 trim() 并用正则更灵活地捕获 <dependency><groupId> 等行

147-153: 使用 context.issue.number 替换硬编码 PR 编号
issue_number: ${{ github.event.pull_request.number }} 可替换为 issue_number: context.issue.number,增强通用性和可读性。

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between f5c1fcf and 1db86fe.

📒 Files selected for processing (1)
  • .github/workflows/check-aliyun-maven.yml (1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.4)
.github/workflows/check-aliyun-maven.yml

120-120: the runner of "actions/github-script@v6" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

⏰ Context from checks skipped due to timeout of 90000ms (8)
  • GitHub Check: build (21, macos-latest, false)
  • GitHub Check: build (21, windows-latest, false)
  • GitHub Check: build (21, ubuntu-latest, false)
  • GitHub Check: build (17, windows-latest, false)
  • GitHub Check: build (17, ubuntu-latest, false)
  • GitHub Check: build (17, macos-latest, false)
  • GitHub Check: StepSecurity Harden-Runner
  • GitHub Check: Summary
🔇 Additional comments (2)
.github/workflows/check-aliyun-maven.yml (2)

1-11: 工作流触发器与权限设置正确
当前配置通过 pull_request_target 仅对 Dependabot PR 运行,并限制了 contents: readpull-requests: write 权限,符合预期。


163-166: 输出结果步骤结构合理
当存在新增依赖时,echo "${{ steps.check-aliyun.outputs.result }}" 可将检查结果打印到日志,流程清晰。

Close #2125

Signed-off-by: unknowIfGuestInDream <liang.tang.cx@gmail.com>
Copy link

sonarqubecloud bot commented May 3, 2025

@unknowIfGuestInDream unknowIfGuestInDream merged commit 77e504f into master May 3, 2025
29 checks passed
@unknowIfGuestInDream unknowIfGuestInDream deleted the pr-2125 branch May 3, 2025 02:02
@quine-bot quine-bot bot mentioned this pull request May 3, 2025
3 tasks
@coderabbitai coderabbitai bot mentioned this pull request May 3, 2025
3 tasks
@coderabbitai coderabbitai bot mentioned this pull request Jun 27, 2025
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] 新增检验aliyun maven是否包含最新依赖
1 participant