diff options
author | Reinier van der Leer <pwuts@agpt.co> | 2024-03-01 11:34:47 +0100 |
---|---|---|
committer | Reinier van der Leer <pwuts@agpt.co> | 2024-03-01 11:34:47 +0100 |
commit | 1e4bd0388f07713dc5ab43a18f8047b0cec35774 (patch) | |
tree | 3ed551ed6939fd4c6e267d82505e4a18789c25b7 /.github | |
parent | fix(ci/arena): Improve output format (diff) | |
download | Auto-GPT-1e4bd0388f07713dc5ab43a18f8047b0cec35774.tar.gz Auto-GPT-1e4bd0388f07713dc5ab43a18f8047b0cec35774.tar.bz2 Auto-GPT-1e4bd0388f07713dc5ab43a18f8047b0cec35774.zip |
fix(ci/arena): Skip checking file against itself for duplicates
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/arena-intake.yml | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/.github/workflows/arena-intake.yml b/.github/workflows/arena-intake.yml index 577231bc5..c5269b897 100644 --- a/.github/workflows/arena-intake.yml +++ b/.github/workflows/arena-intake.yml @@ -76,6 +76,10 @@ jobs: const newArenaFileName = path.basename(newArenaFile.filename) console.log(`🗒️ Arena entry in PR: ${newArenaFile}`); + if (newArenaFile.status != 'added') { + flagForManualCheck = true; + } + if (pr.mergeable != false) { const newArenaEntry = JSON.parse(fs.readFileSync(newArenaFile.filename)); const allArenaFiles = await (await glob.create('arena/*.json')).glob(); @@ -84,11 +88,8 @@ jobs: console.log(`➡️ Checking ${newArenaFileName} against existing entries...`); for (const file of allArenaFiles) { const existingEntryName = path.basename(file); - if ( - existingEntryName === newArenaFileName - && newArenaFile.status != 'added' - ) { - flagForManualCheck = true; + + if (existingEntryName === newArenaFileName) { continue; } @@ -96,7 +97,7 @@ jobs: const arenaEntry = JSON.parse(fs.readFileSync(file)); if (arenaEntry.github_repo_url === newArenaEntry.github_repo_url) { - console.log('⚠️ Duplicate detected: ${existingEntryName}'); + console.log(`⚠️ Duplicate detected: ${existingEntryName}`); issues.push( `The \`github_repo_url\` specified in __${newArenaFileName}__ ` + `already exists in __${existingEntryName}__. ` |