Skip to content

Commit e02870f

Browse files
committed
Deploy Production Code for Commit 17103f7 🚀
1 parent 17103f7 commit e02870f

File tree

5 files changed

+46
-22
lines changed

5 files changed

+46
-22
lines changed

lib/constants.d.ts

+31-11
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,46 @@
22
* Describes the action interface.
33
*/
44
export interface ActionInterface {
5-
/** Deployment token. */
5+
/**
6+
* Deployment token.
7+
*/
68
token?: string;
7-
/** The template to use. */
9+
/**
10+
* The template to use.
11+
*/
812
template: string;
9-
/** The file to replace the content in. */
13+
/**
14+
* The file to replace the content in.
15+
*/
1016
file: string;
11-
/** The minimum amount sponsored to be included. */
17+
/**
18+
* The minimum amount sponsored to be included.
19+
*/
1220
minimum: number;
13-
/** The maximum amount sponsored to be included. */
21+
/**
22+
* The maximum amount sponsored to be included.
23+
*/
1424
maximum: number;
15-
/** The marker at which the content should be included within. */
25+
/**
26+
* The marker at which the content should be included within.
27+
*/
1628
marker: string;
17-
/** If the user has no sponsors, we can replace it with a fallback. */
29+
/**
30+
* If the user has no sponsors, we can replace it with a fallback.
31+
*/
1832
fallback: string;
19-
/** Fetches organization level sponsors if true. */
33+
/**
34+
* Fetches organization level sponsors if true.
35+
*/
2036
organization: boolean;
21-
/** Determines if inactive sponsors should be returned or not. */
37+
/**
38+
* Determines if inactive sponsors should be returned or not.
39+
*/
2240
activeOnly: boolean;
23-
/** Determines if private sponsors should be returned or not. If marked as true, the identity of the sponsor is still
24-
kept private, however, an anonymized version of the sponsor is still included in the list. */
41+
/**
42+
* Determines if private sponsors should be returned or not. If marked as true, the identity of the sponsor is still
43+
* kept private, however, an anonymized version of the sponsor is still included in the list.
44+
*/
2545
includePrivate: boolean;
2646
}
2747
/**

lib/lib.d.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { ActionInterface, Status } from './constants';
22
import { generateFile, getSponsors } from './template';
3-
/** Initializes and runs the action.
4-
*
5-
* @param {ActionInterface} configuration - The configuration object.
3+
/**
4+
* Initializes and runs the action.
5+
* If no configuration is provided, the action will run with the default configuration.
66
*/
7-
export default function run(configuration: ActionInterface): Promise<Status>;
7+
export default function run(configuration?: ActionInterface): Promise<Status>;
88
export { generateFile, getSponsors, ActionInterface };

lib/lib.js

+7-4
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,17 @@ const template_1 = require("./template");
1616
Object.defineProperty(exports, "generateFile", { enumerable: true, get: function () { return template_1.generateFile; } });
1717
Object.defineProperty(exports, "getSponsors", { enumerable: true, get: function () { return template_1.getSponsors; } });
1818
const util_1 = require("./util");
19-
/** Initializes and runs the action.
20-
*
21-
* @param {ActionInterface} configuration - The configuration object.
19+
/**
20+
* Initializes and runs the action.
21+
* If no configuration is provided, the action will run with the default configuration.
2222
*/
2323
function run(configuration) {
2424
return __awaiter(this, void 0, void 0, function* () {
2525
let status = constants_1.Status.RUNNING;
26-
const settings = Object.assign({}, configuration);
26+
/**
27+
* Merges the action configuration with the user configuration.
28+
*/
29+
const settings = Object.assign(Object.assign({}, constants_1.action), configuration);
2730
try {
2831
(0, core_1.info)(`
2932

lib/main.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,5 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
33
return (mod && mod.__esModule) ? mod : { "default": mod };
44
};
55
Object.defineProperty(exports, "__esModule", { value: true });
6-
const constants_1 = require("./constants");
76
const lib_1 = __importDefault(require("./lib"));
8-
(0, lib_1.default)(constants_1.action);
7+
(0, lib_1.default)();

lib/template.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,9 @@ function generateTemplate(response, action) {
121121
? user.tier.monthlyPriceInCents
122122
: 0) <= action.maximum);
123123
}
124-
/** If there are no valid sponsors then we return the provided fallback. */
124+
/**
125+
* If there are no valid sponsors then we return the provided fallback.
126+
*/
125127
if (!filteredSponsors.length) {
126128
return action.fallback;
127129
}

0 commit comments

Comments
 (0)