fix: fix: use Forgejo assignee as issue lock to prevent concurrent claims (#38)
This commit is contained in:
parent
98a71f9192
commit
4c08b7840e
3 changed files with 68 additions and 5 deletions
|
|
@ -185,7 +185,11 @@ log "preflight passed"
|
|||
# =============================================================================
|
||||
# CLAIM ISSUE
|
||||
# =============================================================================
|
||||
issue_claim "$ISSUE"
|
||||
if ! issue_claim "$ISSUE"; then
|
||||
log "SKIP: failed to claim issue #${ISSUE} (already assigned to another agent)"
|
||||
echo '{"status":"already_done","reason":"issue was claimed by another agent"}' > "$PREFLIGHT_RESULT"
|
||||
exit 0
|
||||
fi
|
||||
CLAIMED=true
|
||||
|
||||
# =============================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue