mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-09-17 01:06:37 +08:00
fix: sync upstream
This commit is contained in:
parent
5e59d130c2
commit
5725bfb6df
5
.github/workflows/sync-upstream.yml
vendored
5
.github/workflows/sync-upstream.yml
vendored
@ -68,12 +68,13 @@ jobs:
|
||||
// 创建新分支
|
||||
await exec.exec('git', ['fetch', `https://github.com/${owner}/${repo}.git`, `pull/${pull.number}/head:${branchName}`]);
|
||||
|
||||
// 检查是否已存在相同的PR
|
||||
// 检查是否已存在相同的PR(包括已关闭的)
|
||||
const existingPulls = await github.rest.pulls.list({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
head: `${context.repo.owner}:${branchName}`,
|
||||
});
|
||||
state: 'all' // 检查所有状态的PR,包括open和closed
|
||||
});
|
||||
|
||||
if (existingPulls.data.length === 0) {
|
||||
// 推送分支
|
||||
|
Loading…
Reference in New Issue
Block a user