Skip to content

Commit 99a8baf

Browse files
committed
changes
1 parent b843be8 commit 99a8baf

7 files changed

Lines changed: 75 additions & 56 deletions

File tree

actions/copy-demos/dist/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2049,7 +2049,7 @@ function read_demos_from_json(json_path) {
20492049
async function run() {
20502050
const gradio_version = coreExports.getInput("gradio_version");
20512051
const gradio_client_version = coreExports.getInput("gradio_client_version");
2052-
const config_path = coreExports.getInput("config_path") || path.join(root, ".config", "demos.json");
2052+
const config_path = coreExports.getInput("config_path") || path.join(__dirname, ".config", "demos.json");
20532053
if (!gradio_version || !gradio_client_version) {
20542054
console.error(
20552055
"Usage: node script.js <gradio_version> <gradio_client_version> [config_path]"
@@ -2072,7 +2072,6 @@ ${gradio_client_version}
20722072
${gradio_version}
20732073
pypistats==1.1.0
20742074
plotly
2075-
matplotlib
20762075
altair
20772076
vega_datasets
20782077
`.trim();

actions/filter-paths/dist/index.js

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -86782,7 +86782,6 @@ function match_filter(patterns, files) {
8678286782
}
8678386783
async function run() {
8678486784
var _a;
86785-
console.log(JSON.stringify(context, null, 2));
8678686785
const filter_name = coreExports.getInput("filter");
8678786786
const path = coreExports.getInput("path") || ".github/filters.json";
8678886787
const token = coreExports.getInput("token");
@@ -86795,27 +86794,16 @@ async function run() {
8679586794
}
8679686795
const filter = filters[filter_name];
8679786796
let files = [];
86798-
if (context.eventName === "pull_request") {
86799-
for await (const response of octokit.paginate.iterator(
86800-
octokit.rest.pulls.listFiles,
86801-
{
86802-
owner: context.repo.owner,
86803-
repo: context.repo.repo,
86804-
pull_number: (_a = context.payload.pull_request) == null ? void 0 : _a.number,
86805-
per_page: 100
86806-
}
86807-
)) {
86808-
files = [...files, ...parse_data(response.data)];
86809-
}
86810-
} else if (context.eventName === "push" || context.eventName === "workflow_dispatch") {
86811-
const response = await octokit.rest.repos.getCommit({
86797+
for await (const response of octokit.paginate.iterator(
86798+
octokit.rest.pulls.listFiles,
86799+
{
8681286800
owner: context.repo.owner,
8681386801
repo: context.repo.repo,
86814-
ref: context.ref
86815-
});
86816-
files = [...files, ...parse_data(response.data.files)];
86817-
} else {
86818-
throw new Error("Unsupported event");
86802+
pull_number: (_a = context.payload.pull_request) == null ? void 0 : _a.number,
86803+
per_page: 100
86804+
}
86805+
)) {
86806+
files = [...files, ...parse_data(response.data)];
8681986807
}
8682086808
files = files.map((f) => f.filename);
8682186809
const result = match_filter(filter, files);

actions/find-pr/dist/index.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85283,7 +85283,7 @@ function getOctokit(token, options, ...additionalPlugins) {
8528385283
}
8528485284
getOctokit_1 = github.getOctokit = getOctokit;
8528585285
async function run() {
85286-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v;
85286+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t;
8528785287
const octokit = getOctokit_1(coreExports.getInput("github_token"));
8528885288
const { repo, owner } = context.repo;
8528985289
const outputs = {
@@ -85294,8 +85294,7 @@ async function run() {
8529485294
mergeable: false,
8529585295
merge_sha: false,
8529685296
found_pr: false,
85297-
labels: [],
85298-
actor: false
85297+
labels: []
8529985298
};
8530085299
const open_pull_requests = await get_prs(octokit, repo, owner);
8530185300
if (context.eventName === "push") {
@@ -85396,7 +85395,6 @@ async function run() {
8539685395
merge_sha,
8539785396
labels
8539885397
} = get_pr_details_from_title(open_pull_requests, title);
85399-
console.log(JSON.stringify(context, null, 2));
8540085398
outputs.source_repo = source_repo || false;
8540185399
outputs.source_branch = source_branch || false;
8540285400
outputs.pr_number = pr_number ?? false;
@@ -85405,8 +85403,7 @@ async function run() {
8540585403
outputs.mergeable = mergeable === "MERGEABLE" ? true : false;
8540685404
outputs.merge_sha = merge_sha || sha || false;
8540785405
outputs.labels = labels;
85408-
outputs.actor = ((_t = (_s = context.payload.workflow_run) == null ? void 0 : _s.actor) == null ? void 0 : _t.login) || false;
85409-
} else if ((_v = (_u = context.payload) == null ? void 0 : _u.workflow_run) == null ? void 0 : _v.event) {
85406+
} else if ((_t = (_s = context.payload) == null ? void 0 : _s.workflow_run) == null ? void 0 : _t.event) {
8541085407
coreExports.setFailed(
8541185408
"This action can only be run on pull_request, push, or issue_comment events or workflow_run events triggered from those events."
8541285409
);

actions/generate-changeset/dist/index.js

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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
}
120109120135
run();
120110120136
async function get_changed_files(base_sha) {

actions/publish-pypi/dist/index.js

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34623,7 +34623,7 @@ const runtime_prerequisites_txt = [
3462334623
`pip-with-requires-python==1.0.1
3462434624

3462534625
# The following packages are considered to be unsafe in a requirements file:
34626-
pip>=23.3.1`
34626+
pip==22.3.1`
3462734627
];
3462834628
const runtime_in = [
3462934629
"runtime.in",
@@ -34672,7 +34672,7 @@ keyring==23.11.0
3467234672
# via twine
3467334673
more-itertools==9.0.0
3467434674
# via jaraco-classes
34675-
pkginfo==1.12.0
34675+
pkginfo==1.10.0
3467634676
# via
3467734677
# -r runtime.in
3467834678
# twine
@@ -34767,17 +34767,7 @@ async function run() {
3476734767
"pip",
3476834768
[
3476934769
"install",
34770-
"--user",
34771-
"--upgrade",
34772-
"--no-cache-dir",
34773-
"pip>=23.3.1"
34774-
]
34775-
);
34776-
await exec_2(
34777-
"pip",
34778-
[
34779-
"install",
34780-
"twine==6",
34770+
"twine==4",
3478134771
"--user",
3478234772
"--upgrade",
3478334773
"--no-cache-dir",

actions/set-commit-status/dist/index.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85295,7 +85295,7 @@ async function run() {
8529585295
run_id: parseInt(run_id)
8529685296
});
8529785297
const message = "Skipped — No changes detected";
85298-
const res = await octokit.rest.repos.createCommitStatus({
85298+
octokit.rest.repos.createCommitStatus({
8529985299
owner: context.repo.owner,
8530085300
repo: context.repo.repo,
8530185301
sha,
@@ -85304,8 +85304,5 @@ async function run() {
8530485304
context: name,
8530585305
target_url: url || workflow_run.data.html_url
8530685306
});
85307-
console.log({ sha, name, url });
85308-
console.log(JSON.stringify(workflow_run, null, 2));
85309-
console.log(JSON.stringify(res, null, 2));
8531085307
}
8531185308
run();

0 commit comments

Comments
 (0)