@@ -87331,26 +87331,6 @@ exports.getOctokit = getOctokit;
8733187331
8733287332});
8733387333
87334- // create a check and return a function that updates (completes) it
87335- async function createCheck(github, context) {
87336- var _context$payload$pull;
87337- const check = await github.rest.checks.create({
87338- ...context.repo,
87339- name: "Deploy Preview",
87340- head_sha: (_context$payload$pull = context.payload.pull_request) == null ? void 0 : _context$payload$pull.head.sha,
87341- status: "in_progress"
87342- });
87343- return async details => {
87344- await github.rest.checks.update({
87345- ...context.repo,
87346- check_run_id: check.data.id,
87347- completed_at: new Date().toISOString(),
87348- status: "completed",
87349- ...details
87350- });
87351- };
87352- }
87353-
8735487334// Copyright Joyent, Inc. and other Node contributors.
8735587335//
8735687336// Permission is hereby granted, free of charge, to any person obtaining a
@@ -92976,7 +92956,6 @@ async function execWithCredentials(args, projectId, gacFilename, opts) {
9297692956 }
9297792957 return deployOutputBuf.length ? deployOutputBuf[deployOutputBuf.length - 1].toString("utf-8") : ""; // output from the CLI
9297892958}
92979-
9298092959async function deployPreview(gacFilename, deployConfig) {
9298192960 const {
9298292961 projectId,
@@ -93184,10 +93163,6 @@ const firebaseToolsVersion = core.getInput("firebaseToolsVersion");
9318493163const disableComment = core.getInput("disableComment");
9318593164async function run() {
9318693165 const isPullRequest = !!github.context.payload.pull_request;
93187- let finish = details => console.log(details);
93188- if (token && isPullRequest) {
93189- finish = await createCheck(octokit, github.context);
93190- }
9319193166 try {
9319293167 core.startGroup("Verifying firebase.json exists");
9319393168 if (entryPoint !== ".") {
@@ -93219,16 +93194,6 @@ async function run() {
9321993194 throw Error(deployment.error);
9322093195 }
9322193196 core.endGroup();
93222- const hostname = target ? `${target}.web.app` : `${projectId}.web.app`;
93223- const url = `https://${hostname}/`;
93224- await finish({
93225- details_url: url,
93226- conclusion: "success",
93227- output: {
93228- title: `Production deploy succeeded`,
93229- summary: `[${hostname}](${url})`
93230- }
93231- });
9323293197 return;
9323393198 }
9323493199 const channelId = getChannelId(configuredChannelId, github.context);
@@ -93260,23 +93225,8 @@ async function run() {
9326093225 const commitId = (_context$payload$pull = github.context.payload.pull_request) == null ? void 0 : _context$payload$pull.head.sha.substring(0, 7);
9326193226 await postChannelSuccessComment(octokit, github.context, deployment, commitId);
9326293227 }
93263- await finish({
93264- details_url: urls[0],
93265- conclusion: "success",
93266- output: {
93267- title: `Deploy preview succeeded`,
93268- summary: getURLsMarkdownFromChannelDeployResult(deployment)
93269- }
93270- });
9327193228 } catch (e) {
9327293229 core.setFailed(e.message);
93273- await finish({
93274- conclusion: "failure",
93275- output: {
93276- title: "Deploy preview failed",
93277- summary: `Error: ${e.message}`
93278- }
93279- });
9328093230 }
9328193231}
9328293232run();
0 commit comments