@@ -119864,6 +119864,11 @@ async function run() {
119864119864 const has_approved_label2 = labels.some(
119865119865 (l) => l.name === "changeset:approved"
119866119866 );
119867+ <<<<<<< HEAD
119868+ =======
119869+ let updated_has_approved_label2 = has_approved_label2;
119870+ let selection2 = null;
119871+ >>>>>>> 2fb413e (changes)
119867119872 coreExports.info(`[Manual Mode] Full context:`);
119868119873 coreExports.info(
119869119874 JSON.stringify(
@@ -119884,7 +119889,7 @@ async function run() {
119884119889 );
119885119890 if (comment == null ? void 0 : comment.body) {
119886119891 const wasEdited = comment.lastEditedAt !== null;
119887- const selection = check_for_manual_selection_and_approval(
119892+ selection2 = check_for_manual_selection_and_approval(
119888119893 comment.body,
119889119894 wasEdited,
119890119895 comment.editor,
@@ -119896,25 +119901,37 @@ async function run() {
119896119901 {
119897119902 wasEdited,
119898119903 editor: comment.editor,
119904+ <<<<<<< HEAD
119899119905 checkbox_checked: selection.checkbox_checked,
119900119906 has_approved_label: has_approved_label2,
119901119907 should_toggle_label: selection.should_toggle_label
119908+ =======
119909+ checkbox_checked: selection2.checkbox_checked,
119910+ has_approved_label: has_approved_label2,
119911+ should_toggle_label: selection2.should_toggle_label
119912+ >>>>>>> 2fb413e (changes)
119902119913 },
119903119914 null,
119904119915 2
119905119916 )
119906119917 );
119918+ <<<<<<< HEAD
119907119919 if (selection.should_toggle_label) {
119920+ =======
119921+ if (selection2.should_toggle_label) {
119922+ >>>>>>> 2fb413e (changes)
119908119923 const approved_label_id = await client.get_or_create_label(
119909119924 "changeset:approved"
119910119925 );
119911119926 if (approved_label_id) {
119912- if (selection .checkbox_checked) {
119927+ if (selection2 .checkbox_checked) {
119913119928 coreExports.info(`[Manual Mode] Adding changeset:approved label`);
119914119929 await client.add_label(pr_id, approved_label_id);
119930+ updated_has_approved_label2 = true;
119915119931 } else {
119916119932 coreExports.info(`[Manual Mode] Removing changeset:approved label`);
119917119933 await client.remove_label(pr_id, approved_label_id);
119934+ updated_has_approved_label2 = false;
119918119935 }
119919119936 } else {
119920119937 coreExports.warning(
@@ -119934,6 +119951,7 @@ async function run() {
119934119951 );
119935119952 return;
119936119953 }
119954+ const final_has_approved_label2 = (comment == null ? void 0 : comment.body) && (selection2 == null ? void 0 : selection2.should_toggle_label) ? updated_has_approved_label2 : has_approved_label2;
119937119955 const { pr_comment_content: pr_comment_content2, changes: changes2 } = create_changeset_comment({
119938119956 packages: versions,
119939119957 changelog: !valid ? message : changelog_entry_message,
@@ -119942,7 +119960,7 @@ async function run() {
119942119960 changeset_content: old_changeset_content,
119943119961 changeset_url: `https://github.com/${source_repo_name}/edit/${source_branch_name}/${changeset_path}`,
119944119962 previous_comment: comment == null ? void 0 : comment.body,
119945- has_approved_label: labels.some((l) => l.name === "changeset:approved") ,
119963+ has_approved_label: final_has_approved_label2 ,
119946119964 changelog_entry_type
119947119965 });
119948119966 if (changes2) {
@@ -119967,6 +119985,11 @@ async function run() {
119967119985 const has_approved_label = labels.some(
119968119986 (l) => l.name === "changeset:approved"
119969119987 );
119988+ <<<<<<< HEAD
119989+ =======
119990+ let updated_has_approved_label = has_approved_label;
119991+ let selection = null;
119992+ >>>>>>> 2fb413e (changes)
119970119993 coreExports.info(`[Normal Mode] Full context:`);
119971119994 coreExports.info(
119972119995 JSON.stringify(
@@ -119987,7 +120010,7 @@ async function run() {
119987120010 );
119988120011 if (comment == null ? void 0 : comment.body) {
119989120012 const wasEdited = comment.lastEditedAt !== null;
119990- const selection = check_for_manual_selection_and_approval(
120013+ selection = check_for_manual_selection_and_approval(
119991120014 comment.body,
119992120015 wasEdited,
119993120016 comment.editor,
@@ -120021,9 +120044,11 @@ async function run() {
120021120044 if (selection.checkbox_checked) {
120022120045 coreExports.info(`[Normal Mode] Adding changeset:approved label`);
120023120046 await client.add_label(pr_id, approved_label_id);
120047+ updated_has_approved_label = true;
120024120048 } else {
120025120049 coreExports.info(`[Normal Mode] Removing changeset:approved label`);
120026120050 await client.remove_label(pr_id, approved_label_id);
120051+ updated_has_approved_label = false;
120027120052 }
120028120053 } else {
120029120054 coreExports.warning(
@@ -120080,14 +120105,15 @@ async function run() {
120080120105 await exec_2("git", ["commit", "-m", `${operation} changeset`]);
120081120106 await exec_2("git", ["push"]);
120082120107 }
120108+ const final_has_approved_label = (comment == null ? void 0 : comment.body) && (selection == null ? void 0 : selection.should_toggle_label) ? updated_has_approved_label : has_approved_label;
120083120109 const { pr_comment_content, changes } = create_changeset_comment({
120084120110 packages: packages_versions,
120085120111 changelog: title,
120086120112 manual_package_selection,
120087120113 changeset_content,
120088120114 changeset_url: `https://github.com/${source_repo_name}/edit/${source_branch_name}/${changeset_path}`,
120089120115 previous_comment: comment == null ? void 0 : comment.body,
120090- has_approved_label,
120116+ has_approved_label: final_has_approved_label ,
120091120117 changelog_entry_type: type2 || "unknown"
120092120118 });
120093120119 if (changes) {
@@ -120104,7 +120130,7 @@ async function run() {
120104120130 coreExports.setOutput("comment_url", comment == null ? void 0 : comment.url);
120105120131 }
120106120132 coreExports.setOutput("skipped", "false");
120107- coreExports.setOutput("approved", has_approved_label .toString());
120133+ coreExports.setOutput("approved", final_has_approved_label .toString());
120108120134}
120109120135run();
120110120136async function get_changed_files(base_sha) {
0 commit comments