Skip to content

Commit d3e8cf0

Browse files
chore(release): 1.3.0 [skip ci]
# [1.3.0](v1.2.0...v1.3.0) (2023-07-14) ### Features * add support for additional placeholders ([#3](#3)) ([663636b](663636b))
1 parent 663636b commit d3e8cf0

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

dist/index.js

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24708,6 +24708,20 @@ const notifySlackWebhook = async (webhookUrl, message) => {
2470824708
});
2470924709
};
2471024710

24711+
;// CONCATENATED MODULE: ./src/reducers.ts
24712+
const reduceAdditionalPlaceholders = (multilineInput) => multilineInput.reduce((acc, input) => {
24713+
const indexOfFirstEquals = input.indexOf("=");
24714+
if (indexOfFirstEquals < 0) {
24715+
return acc;
24716+
}
24717+
const key = input.substring(0, indexOfFirstEquals);
24718+
const value = input.substring(indexOfFirstEquals + 1);
24719+
if (!key) {
24720+
return acc;
24721+
}
24722+
return { ...acc, [key]: value };
24723+
}, {});
24724+
2471124725
;// CONCATENATED MODULE: ./src/sqrl/filters.ts
2471224726
const registerFilters = () => { };
2471324727
const filters_unregisterFilters = () => { };
@@ -24760,6 +24774,7 @@ const templateMessage = (params) => {
2476024774
github: params.github,
2476124775
links,
2476224776
repository,
24777+
...params.additionalPlaceholders,
2476324778
}, {
2476424779
tags: ["[[", "]]"],
2476524780
});
@@ -24772,13 +24787,17 @@ const templateMessage = (params) => {
2477224787

2477324788

2477424789

24790+
2477524791
(async () => {
2477624792
register();
2477724793
const dryRun = core.getBooleanInput("dryRun");
2477824794
const webhook = core.getInput("slackWebhook", { required: true });
2477924795
const configMessage = core.getInput("message");
2478024796
const linkRoot = core.getInput("linkRoot") || "https://github.com";
24797+
const additionalPlaceholdersAsArray = core.getMultilineInput("additionalPlaceholders");
24798+
const additionalPlaceholders = reduceAdditionalPlaceholders(additionalPlaceholdersAsArray);
2478124799
const templatedMessage = templateMessage({
24800+
additionalPlaceholders,
2478224801
configMessage,
2478324802
github: github.context,
2478424803
linkRoot,
@@ -24789,7 +24808,7 @@ const templateMessage = (params) => {
2478924808
}
2479024809
else {
2479124810
console.log("Dry run enabled, printing message instead!");
24792-
console.log(message);
24811+
console.log(message.buildToJSON());
2479324812
}
2479424813
})().catch((e) => {
2479524814
console.error(e);

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)