Repository navigation
ci: restrict scheduled workflows to upstream repository - #225
HsiangNianian merged 2 commits into
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideBoth GitHub Actions jobs now use job-level conditions requiring github.repository to equal the upstream HydroRoll-Team/DropOut repository, preventing scheduled workflows from executing in forks or other repository contexts. Flow diagram for upstream-only scheduled workflowsflowchart TD
A[Scheduled workflow trigger] --> B{github.repository == HydroRoll-Team/DropOut}
B -->|yes| C[Run workflow job]
B -->|no| D[Skip workflow job]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path=".github/workflows/production-smoke.yml" line_range="29" />
<code_context>
jobs:
smoke:
+ if: github.repository == 'HydroRoll-Team/DropOut'
name: Smoke dropout.hydroroll.team
runs-on: ubuntu-latest
</code_context>
<issue_to_address>
**Fork pull requests run production smoke**
When a pull request from a fork targets the upstream repository, `github.repository` resolves to the upstream base repository, so the condition passes and the production smoke job runs instead of being skipped.
Check the pull request head repository, or otherwise exclude fork pull requests, rather than relying on `github.repository`.
</issue_to_address>Sourcery assessment
Approval pending. 1 finding to address first.
Blocking findings: .github/workflows/production-smoke.yml:29
HsiangNianian
left a comment
There was a problem hiding this comment.
Thanks for your commits!
There was a problem hiding this comment.
🟢 Approval recommended
The conditions implement the intended restrictions while preserving upstream scheduled execution.
0 open findings
What changed in this PR
Restricts maintenance and production smoke jobs to the upstream HydroRoll-Team/DropOut repository.
Changes:
- Adds repository guards to both jobs.
- Limits pull-request smoke checks to branches hosted upstream.
| File | Description |
|---|---|
.github/workflows/stale.yml |
Restricts stale-issue maintenance to upstream. |
.github/workflows/production-smoke.yml |
Adds upstream repository and pull-request source checks. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
描述
限制两个定时工作流仅在上游主仓库
HydroRoll-Team/DropOut中运行,避免 fork 仓库执行这些工作流。更改类型
LLM 生成代码声明
相关 Issue
关闭 #
相关 #
更改内容
后端 (Rust)
前端 (Svelte)
配置
Close stale issues和Production Smoke Check的 job 添加仓库条件,仅当github.repository为HydroRoll-Team/DropOut时运行。测试
测试环境
测试用例
测试步骤
不适用(GitHub Actions 工作流配置更改)。
检查清单
代码质量
测试验证
文档更新
依赖项
Cargo.lock和/或pnpm-lock.yaml已更新(如果依赖项有变化)截图 / 视频
不适用。
附加说明
本地提交钩子中的 YAML 检查已通过。
破坏性更改说明
不适用。
维护者专用:
Summary by Sourcery
Limit scheduled CI workflows to the upstream repository to prevent fork executions.
Enhancements:
CI: