File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -809,7 +809,19 @@ def make_cdn_builds_public(version:)
809809 release_name = "v#{ version } "
810810 post_ids = extract_cdn_post_ids_from_draft_release ( release_name : release_name )
811811
812- UI . user_error! ( "No CDN post IDs found in draft release #{ release_name } . Cannot publish without updating CDN visibility." ) if cdn_post_ids . empty?
812+ if post_ids . empty?
813+ UI . user_error! <<~ERROR
814+ No CDN post IDs found in draft release #{ release_name } . Cannot publish without updating CDN visibility.
815+ To recover manually, an Automattician can find the post IDs by running this from a proxied machine:
816+ curl -H "Authorization: Bearer $WPCOM_API_TOKEN" \\
817+ "https://public-api.wordpress.com/wp/v2/sites/#{ WPCOM_STUDIO_SITE_ID } /a8c_cdn_build?search=#{ version } &visibility=1316&per_page=20" \\
818+ | jq '[.[] | {id, slug}]'
819+ (visibility=1316 filters for Internal builds only)
820+ Then edit the draft GitHub release body to add a comment like:
821+ <!-- CDN_POST_IDS:123,456,789 -->
822+ and retry the publish_release lane or release tool task.
823+ ERROR
824+ end
813825
814826 UI . message ( "Updating CDN build visibility to External for #{ post_ids . size } builds..." )
815827
You can’t perform that action at this time.
0 commit comments