mirror of
https://github.com/github/codeql-action.git
synced 2025-12-27 01:30:10 +08:00
31 lines
573 B
JavaScript
31 lines
573 B
JavaScript
function toTokenAuthentication({
|
|
installationId,
|
|
token,
|
|
createdAt,
|
|
expiresAt,
|
|
repositorySelection,
|
|
permissions,
|
|
repositoryIds,
|
|
repositoryNames,
|
|
singleFileName
|
|
}) {
|
|
return Object.assign(
|
|
{
|
|
type: "token",
|
|
tokenType: "installation",
|
|
token,
|
|
installationId,
|
|
permissions,
|
|
createdAt,
|
|
expiresAt,
|
|
repositorySelection
|
|
},
|
|
repositoryIds ? { repositoryIds } : null,
|
|
repositoryNames ? { repositoryNames } : null,
|
|
singleFileName ? { singleFileName } : null
|
|
);
|
|
}
|
|
export {
|
|
toTokenAuthentication
|
|
};
|