Skip to content

Commit

Permalink
Fix the broken statuses
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroen committed Nov 20, 2023
1 parent ba4b5ee commit 3369f29
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions R/status.R
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,19 @@ gh_app_set_commit_status <- function(repo, pkg, sha, url, universe, deployed_pac
print(gh::gh(endpoint, .method = 'POST', .token = token, state = docs_status,
target_url = docs_url, context = 'pkgdown-docs', description = description))
}

# Temp fix: reset old broken statuses
if(state != 'pending') {
statuses <- gh::gh(endpoint)
pending <- Find(function(x){
return(x$status == 'pending' && x$context == sprintf('r-universe/%s//deploy', universe))
}, statuses)
if(length(pending)){
print("Restting broken status update!")
print(gh::gh(pending$url, .method = 'POST', .token = token, state = state,
target_url = univ_url, context = pending$context, description = description))
}
}
}

is_success <- function(deployed_packages, source_status, os_type){
Expand Down

0 comments on commit 3369f29

Please sign in to comment.