initial commit of actions
This commit is contained in:
commit
949ece5785
44660 changed files with 12034344 additions and 0 deletions
17
github/codeql-action-v2/node_modules/@octokit/endpoint/dist-src/util/add-query-parameters.js
generated
vendored
Normal file
17
github/codeql-action-v2/node_modules/@octokit/endpoint/dist-src/util/add-query-parameters.js
generated
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
export function addQueryParameters(url, parameters) {
|
||||
const separator = /\?/.test(url) ? "&" : "?";
|
||||
const names = Object.keys(parameters);
|
||||
if (names.length === 0) {
|
||||
return url;
|
||||
}
|
||||
return (url +
|
||||
separator +
|
||||
names
|
||||
.map((name) => {
|
||||
if (name === "q") {
|
||||
return ("q=" + parameters.q.split("+").map(encodeURIComponent).join("+"));
|
||||
}
|
||||
return `${name}=${encodeURIComponent(parameters[name])}`;
|
||||
})
|
||||
.join("&"));
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue