Skip to content

Commit

Permalink
🔖 Release v1.17.15 [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
BetaHuhnBot committed May 9, 2022
1 parent c72f7c7 commit feee0df
Show file tree
Hide file tree
Showing 4 changed files with 129 additions and 112 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## [v1.17.15] - 2022-05-09

[Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.17.15) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.17.14...v1.17.15) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.17.15) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.17.15.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.17.15.tar.gz))

### Dependency updates

- [`b3c326d`](https://github.com/betahuhn/repo-file-sync-action/commit/b3c326d) Bump @actions/core from 1.7.0 to 1.8.0

## [v1.17.14] - 2022-05-05

[Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.17.14) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.17.13...v1.17.14) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.17.14) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.17.14.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.17.14.tar.gz))
Expand Down
229 changes: 119 additions & 110 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -416,10 +416,15 @@ function getIDToken(aud) {
}
exports.getIDToken = getIDToken;
/**
* Markdown summary exports
* Summary exports
*/
var markdown_summary_1 = __nccwpck_require__(8042);
Object.defineProperty(exports, "markdownSummary", ({ enumerable: true, get: function () { return markdown_summary_1.markdownSummary; } }));
var summary_1 = __nccwpck_require__(1327);
Object.defineProperty(exports, "summary", ({ enumerable: true, get: function () { return summary_1.summary; } }));
/**
* @deprecated use core.summary
*/
var summary_2 = __nccwpck_require__(1327);
Object.defineProperty(exports, "markdownSummary", ({ enumerable: true, get: function () { return summary_2.markdownSummary; } }));
//# sourceMappingURL=core.js.map

/***/ }),
Expand Down Expand Up @@ -473,7 +478,91 @@ exports.issueCommand = issueCommand;

/***/ }),

/***/ 8042:
/***/ 8041:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {

"use strict";

var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.OidcClient = void 0;
const http_client_1 = __nccwpck_require__(9925);
const auth_1 = __nccwpck_require__(3702);
const core_1 = __nccwpck_require__(2186);
class OidcClient {
static createHttpClient(allowRetry = true, maxRetry = 10) {
const requestOptions = {
allowRetries: allowRetry,
maxRetries: maxRetry
};
return new http_client_1.HttpClient('actions/oidc-client', [new auth_1.BearerCredentialHandler(OidcClient.getRequestToken())], requestOptions);
}
static getRequestToken() {
const token = process.env['ACTIONS_ID_TOKEN_REQUEST_TOKEN'];
if (!token) {
throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable');
}
return token;
}
static getIDTokenUrl() {
const runtimeUrl = process.env['ACTIONS_ID_TOKEN_REQUEST_URL'];
if (!runtimeUrl) {
throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable');
}
return runtimeUrl;
}
static getCall(id_token_url) {
var _a;
return __awaiter(this, void 0, void 0, function* () {
const httpclient = OidcClient.createHttpClient();
const res = yield httpclient
.getJson(id_token_url)
.catch(error => {
throw new Error(`Failed to get ID Token. \n
Error Code : ${error.statusCode}\n
Error Message: ${error.result.message}`);
});
const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value;
if (!id_token) {
throw new Error('Response json body do not have ID Token field');
}
return id_token;
});
}
static getIDToken(audience) {
return __awaiter(this, void 0, void 0, function* () {
try {
// New ID Token is requested from action service
let id_token_url = OidcClient.getIDTokenUrl();
if (audience) {
const encodedAudience = encodeURIComponent(audience);
id_token_url = `${id_token_url}&audience=${encodedAudience}`;
}
core_1.debug(`ID token url is ${id_token_url}`);
const id_token = yield OidcClient.getCall(id_token_url);
core_1.setSecret(id_token);
return id_token;
}
catch (error) {
throw new Error(`Error message: ${error.message}`);
}
});
}
}
exports.OidcClient = OidcClient;
//# sourceMappingURL=oidc-utils.js.map

/***/ }),

/***/ 1327:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {

"use strict";
Expand All @@ -488,13 +577,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
});
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0;
exports.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0;
const os_1 = __nccwpck_require__(2037);
const fs_1 = __nccwpck_require__(7147);
const { access, appendFile, writeFile } = fs_1.promises;
exports.SUMMARY_ENV_VAR = 'GITHUB_STEP_SUMMARY';
exports.SUMMARY_DOCS_URL = 'https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-markdown-summary';
class MarkdownSummary {
exports.SUMMARY_DOCS_URL = 'https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary';
class Summary {
constructor() {
this._buffer = '';
}
Expand All @@ -511,7 +600,7 @@ class MarkdownSummary {
}
const pathFromEnv = process.env[exports.SUMMARY_ENV_VAR];
if (!pathFromEnv) {
throw new Error(`Unable to find environment variable for $${exports.SUMMARY_ENV_VAR}. Check if your runtime environment supports markdown summaries.`);
throw new Error(`Unable to find environment variable for $${exports.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`);
}
try {
yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK);
Expand Down Expand Up @@ -546,7 +635,7 @@ class MarkdownSummary {
*
* @param {SummaryWriteOptions} [options] (optional) options for write operation
*
* @returns {Promise<MarkdownSummary>} markdown summary instance
* @returns {Promise<Summary>} summary instance
*/
write(options) {
return __awaiter(this, void 0, void 0, function* () {
Expand All @@ -560,7 +649,7 @@ class MarkdownSummary {
/**
* Clears the summary buffer and wipes the summary file
*
* @returns {MarkdownSummary} markdown summary instance
* @returns {Summary} summary instance
*/
clear() {
return __awaiter(this, void 0, void 0, function* () {
Expand All @@ -586,7 +675,7 @@ class MarkdownSummary {
/**
* Resets the summary buffer without writing to summary file
*
* @returns {MarkdownSummary} markdown summary instance
* @returns {Summary} summary instance
*/
emptyBuffer() {
this._buffer = '';
Expand All @@ -598,7 +687,7 @@ class MarkdownSummary {
* @param {string} text content to add
* @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false)
*
* @returns {MarkdownSummary} markdown summary instance
* @returns {Summary} summary instance
*/
addRaw(text, addEOL = false) {
this._buffer += text;
Expand All @@ -607,7 +696,7 @@ class MarkdownSummary {
/**
* Adds the operating system-specific end-of-line marker to the buffer
*
* @returns {MarkdownSummary} markdown summary instance
* @returns {Summary} summary instance
*/
addEOL() {
return this.addRaw(os_1.EOL);
Expand All @@ -618,7 +707,7 @@ class MarkdownSummary {
* @param {string} code content to render within fenced code block
* @param {string} lang (optional) language to syntax highlight code
*
* @returns {MarkdownSummary} markdown summary instance
* @returns {Summary} summary instance
*/
addCodeBlock(code, lang) {
const attrs = Object.assign({}, (lang && { lang }));
Expand All @@ -631,7 +720,7 @@ class MarkdownSummary {
* @param {string[]} items list of items to render
* @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false)
*
* @returns {MarkdownSummary} markdown summary instance
* @returns {Summary} summary instance
*/
addList(items, ordered = false) {
const tag = ordered ? 'ol' : 'ul';
Expand All @@ -644,7 +733,7 @@ class MarkdownSummary {
*
* @param {SummaryTableCell[]} rows table rows
*
* @returns {MarkdownSummary} markdown summary instance
* @returns {Summary} summary instance
*/
addTable(rows) {
const tableBody = rows
Expand Down Expand Up @@ -672,7 +761,7 @@ class MarkdownSummary {
* @param {string} label text for the closed state
* @param {string} content collapsable content
*
* @returns {MarkdownSummary} markdown summary instance
* @returns {Summary} summary instance
*/
addDetails(label, content) {
const element = this.wrap('details', this.wrap('summary', label) + content);
Expand All @@ -685,7 +774,7 @@ class MarkdownSummary {
* @param {string} alt text description of the image
* @param {SummaryImageOptions} options (optional) addition image attributes
*
* @returns {MarkdownSummary} markdown summary instance
* @returns {Summary} summary instance
*/
addImage(src, alt, options) {
const { width, height } = options || {};
Expand All @@ -699,7 +788,7 @@ class MarkdownSummary {
* @param {string} text heading text
* @param {number | string} [level=1] (optional) the heading level, default: 1
*
* @returns {MarkdownSummary} markdown summary instance
* @returns {Summary} summary instance
*/
addHeading(text, level) {
const tag = `h${level}`;
Expand All @@ -712,7 +801,7 @@ class MarkdownSummary {
/**
* Adds an HTML thematic break (<hr>) to the summary buffer
*
* @returns {MarkdownSummary} markdown summary instance
* @returns {Summary} summary instance
*/
addSeparator() {
const element = this.wrap('hr', null);
Expand All @@ -721,7 +810,7 @@ class MarkdownSummary {
/**
* Adds an HTML line break (<br>) to the summary buffer
*
* @returns {MarkdownSummary} markdown summary instance
* @returns {Summary} summary instance
*/
addBreak() {
const element = this.wrap('br', null);
Expand All @@ -733,7 +822,7 @@ class MarkdownSummary {
* @param {string} text quote text
* @param {string} cite (optional) citation url
*
* @returns {MarkdownSummary} markdown summary instance
* @returns {Summary} summary instance
*/
addQuote(text, cite) {
const attrs = Object.assign({}, (cite && { cite }));
Expand All @@ -746,100 +835,20 @@ class MarkdownSummary {
* @param {string} text link text/content
* @param {string} href hyperlink
*
* @returns {MarkdownSummary} markdown summary instance
* @returns {Summary} summary instance
*/
addLink(text, href) {
const element = this.wrap('a', text, { href });
return this.addRaw(element).addEOL();
}
}
// singleton export
exports.markdownSummary = new MarkdownSummary();
//# sourceMappingURL=markdown-summary.js.map

/***/ }),

/***/ 8041:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {

"use strict";

var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.OidcClient = void 0;
const http_client_1 = __nccwpck_require__(9925);
const auth_1 = __nccwpck_require__(3702);
const core_1 = __nccwpck_require__(2186);
class OidcClient {
static createHttpClient(allowRetry = true, maxRetry = 10) {
const requestOptions = {
allowRetries: allowRetry,
maxRetries: maxRetry
};
return new http_client_1.HttpClient('actions/oidc-client', [new auth_1.BearerCredentialHandler(OidcClient.getRequestToken())], requestOptions);
}
static getRequestToken() {
const token = process.env['ACTIONS_ID_TOKEN_REQUEST_TOKEN'];
if (!token) {
throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable');
}
return token;
}
static getIDTokenUrl() {
const runtimeUrl = process.env['ACTIONS_ID_TOKEN_REQUEST_URL'];
if (!runtimeUrl) {
throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable');
}
return runtimeUrl;
}
static getCall(id_token_url) {
var _a;
return __awaiter(this, void 0, void 0, function* () {
const httpclient = OidcClient.createHttpClient();
const res = yield httpclient
.getJson(id_token_url)
.catch(error => {
throw new Error(`Failed to get ID Token. \n
Error Code : ${error.statusCode}\n
Error Message: ${error.result.message}`);
});
const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value;
if (!id_token) {
throw new Error('Response json body do not have ID Token field');
}
return id_token;
});
}
static getIDToken(audience) {
return __awaiter(this, void 0, void 0, function* () {
try {
// New ID Token is requested from action service
let id_token_url = OidcClient.getIDTokenUrl();
if (audience) {
const encodedAudience = encodeURIComponent(audience);
id_token_url = `${id_token_url}&audience=${encodedAudience}`;
}
core_1.debug(`ID token url is ${id_token_url}`);
const id_token = yield OidcClient.getCall(id_token_url);
core_1.setSecret(id_token);
return id_token;
}
catch (error) {
throw new Error(`Error message: ${error.message}`);
}
});
}
}
exports.OidcClient = OidcClient;
//# sourceMappingURL=oidc-utils.js.map
const _summary = new Summary();
/**
* @deprecated use `core.summary`
*/
exports.markdownSummary = _summary;
exports.summary = _summary;
//# sourceMappingURL=summary.js.map

/***/ }),

Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit feee0df

Please sign in to comment.