mirror of
https://github.com/garronej/ts-ci.git
synced 2025-12-01 05:43:06 +00:00
Follow up from https://github.com/garronej/github_actions_toolkit
This commit is contained in:
commit
5297ab00ab
54 changed files with 18162 additions and 0 deletions
17
src/test/dispatch_event.ts
Normal file
17
src/test/dispatch_event.ts
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
|
||||
|
||||
|
||||
import { action } from "../dispatch_event";
|
||||
|
||||
action(
|
||||
"dispatch_event",
|
||||
{
|
||||
"owner": "garronej",
|
||||
"repo": "test-repo",
|
||||
"event_type": "example-event",
|
||||
"client_payload_json": JSON.stringify({ "foo": "bar" }),
|
||||
"github_token": ""
|
||||
},
|
||||
{ "debug": console.log }
|
||||
);
|
||||
|
||||
22
src/test/get_package_json_version.ts
Normal file
22
src/test/get_package_json_version.ts
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
|
||||
|
||||
|
||||
import { action } from "../get_package_json_version";
|
||||
|
||||
(async () => {
|
||||
|
||||
const repo = "denoify";
|
||||
|
||||
const result = await action("get_package_json_version", {
|
||||
"owner": "garronej",
|
||||
repo,
|
||||
"branch": "aa5da60301bea4cf0e80e98a4579f7076b544a44",
|
||||
"compare_to_version": "0.0.0"
|
||||
}, { "debug": console.log });
|
||||
|
||||
console.log(result);
|
||||
|
||||
|
||||
})();
|
||||
|
||||
|
||||
20
src/test/is_package_json_version_upgraded.ts
Normal file
20
src/test/is_package_json_version_upgraded.ts
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
|
||||
|
||||
import { action } from "../is_package_json_version_upgraded";
|
||||
|
||||
(async () => {
|
||||
|
||||
const repo = "keycloakify-demo-app";
|
||||
|
||||
const result = await action("is_package_json_version_upgraded", {
|
||||
"owner": "InseeFrLab",
|
||||
repo,
|
||||
"branch": "4fc0ccb46bdb3912e0a215ca3ae45aed458ea6a4",
|
||||
"github_token": ""
|
||||
}, { "debug": console.log });
|
||||
|
||||
console.log(result);
|
||||
|
||||
})();
|
||||
|
||||
|
||||
33
src/test/is_well_formed_and_available_module_name.ts
Normal file
33
src/test/is_well_formed_and_available_module_name.ts
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
|
||||
|
||||
|
||||
|
||||
import { action } from "../is_well_formed_and_available_module_name";
|
||||
|
||||
(async () => {
|
||||
|
||||
|
||||
for (const module_name of [
|
||||
"congenial_pancake",
|
||||
"evt",
|
||||
"_okay",
|
||||
"mai-oui-c-clair"
|
||||
]) {
|
||||
|
||||
console.log({ module_name });
|
||||
|
||||
const resp = await action(
|
||||
"is_well_formed_and_available_module_name",
|
||||
{ module_name },
|
||||
{ "debug": console.log }
|
||||
);
|
||||
|
||||
console.log(resp);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
})();
|
||||
|
||||
|
||||
27
src/test/setup_repo_webhook_for_deno_land_publishing.ts
Normal file
27
src/test/setup_repo_webhook_for_deno_land_publishing.ts
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
|
||||
import { action } from "../setup_repo_webhook_for_deno_land_publishing";
|
||||
import * as st from "scripting-tools";
|
||||
|
||||
(async () => {
|
||||
|
||||
st.enableCmdTrace();
|
||||
|
||||
const repo = "reimagined_octo_winner_kay";
|
||||
|
||||
const resp = await action(
|
||||
"setup_repo_webhook_for_deno_land_publishing",
|
||||
{
|
||||
"owner": "garronej",
|
||||
"repo": "reimagined_octo_winner_kay",
|
||||
"should_webhook_be_enabled": "false",
|
||||
"github_token": ""
|
||||
},
|
||||
{
|
||||
"debug": console.log,
|
||||
"warning": console.warn
|
||||
}
|
||||
);
|
||||
|
||||
console.log(resp);
|
||||
|
||||
})();
|
||||
17
src/test/string_replace.ts
Normal file
17
src/test/string_replace.ts
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
|
||||
import { action } from "../string_replace";
|
||||
import * as st from "scripting-tools";
|
||||
|
||||
(async () => {
|
||||
|
||||
const { replace_result } = await action("string_replace", {
|
||||
"input_string": "octo-computing-machine",
|
||||
"search_value": "-",
|
||||
"replace_value": "_"
|
||||
},
|
||||
{ "debug": console.log }
|
||||
);
|
||||
|
||||
console.log({ replace_result });
|
||||
|
||||
})();
|
||||
20
src/test/sync_package_and_package_lock_version.ts
Normal file
20
src/test/sync_package_and_package_lock_version.ts
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
|
||||
|
||||
import { action } from "../sync_package_and_package_lock_version";
|
||||
|
||||
(async () => {
|
||||
|
||||
const repo = "literate-sniffle";
|
||||
|
||||
await action("sync_package_and_package_lock_version", {
|
||||
"owner": "garronej",
|
||||
repo,
|
||||
"branch": "master",
|
||||
"github_token": ""
|
||||
},
|
||||
{ "debug": console.log }
|
||||
);
|
||||
|
||||
})();
|
||||
|
||||
|
||||
17
src/test/tell_if_project_uses_npm_or_yarn.ts
Normal file
17
src/test/tell_if_project_uses_npm_or_yarn.ts
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
|
||||
|
||||
import { action } from "../tell_if_project_uses_npm_or_yarn";
|
||||
|
||||
(async () => {
|
||||
|
||||
const repo = "powerhooks";
|
||||
|
||||
await action("tell_if_project_uses_npm_or_yarn", {
|
||||
"owner": "garronej",
|
||||
repo,
|
||||
"branch": "refs/heads/master"
|
||||
},
|
||||
{ "debug": console.log }
|
||||
);
|
||||
|
||||
})();
|
||||
25
src/test/update_changelog.ts
Normal file
25
src/test/update_changelog.ts
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
|
||||
import { action } from "../update_changelog";
|
||||
import * as st from "scripting-tools";
|
||||
|
||||
(async () => {
|
||||
|
||||
st.enableCmdTrace();
|
||||
|
||||
const repo = "sturdy_umbrella";
|
||||
|
||||
await action("update_changelog", {
|
||||
"owner": "garronej",
|
||||
repo,
|
||||
"branch": "dev",
|
||||
"exclude_commit_from_author_names_json": JSON.stringify(["denoify_ci"]),
|
||||
"github_token": ""
|
||||
},
|
||||
{
|
||||
"debug": console.log,
|
||||
"warning": console.log
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
})();
|
||||
Loading…
Add table
Add a link
Reference in a new issue