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 fa0761e
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions R/status.R
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,21 @@ 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 <- sprintf('/repos/%s/commits/%s/status', repo, sha)$statuses
pending <- Find(function(x){
return(x$state == 'pending' && x$context == sprintf('r-universe/%s//deploy', universe))
}, statuses)
if(length(pending)){
print("Finalizing broken status update...")
print(gh::gh(pending$url, .method = 'POST', .token = token, state = state,
target_url = univ_url, context = pending$context, description = description))
} else {
print("No broken status update needed.")
}
}
}

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

0 comments on commit fa0761e

Please sign in to comment.