mirror of
https://github.com/actions/toolkit.git
synced 2026-08-20 00:00:14 +02:00
@@ -44,10 +44,7 @@ export type StorageRecordOptions = {
|
||||
|
||||
/**
|
||||
* Writes a storage record on behalf of an artifact that has been attested
|
||||
* @param artifactParams - parameters for the artifact.
|
||||
* @param packageRegistryParams - parameters for the package registry.
|
||||
* @param token - The GitHub token for authentication.
|
||||
* @param options - Optional parameters for the write operation.
|
||||
* @param StorageRecordOptions - parameters for the storage record API request.
|
||||
* @returns The ID of the storage record.
|
||||
* @throws Error if the storage record fails to persist.
|
||||
*/
|
||||
@@ -73,14 +70,3 @@ export async function createStorageRecord(options: StorageRecordOptions): Promis
|
||||
throw new Error(`Failed to persist storage record: ${message}`)
|
||||
}
|
||||
}
|
||||
|
||||
const buildRequestParams = (artifactParams: ArtifactParams, registryParams: PackageRegistryParams) => {
|
||||
const { registryUrl, artifactUrl, ...rest } = registryParams
|
||||
return {
|
||||
...artifactParams,
|
||||
...rest,
|
||||
// rename parameters to match API expectations
|
||||
artifact_url: artifactUrl,
|
||||
registry_url: registryUrl,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
export {createStorageRecord} from '.artifactMetadata'
|
||||
export {createStorageRecord} from './artifactMetadata'
|
||||
export {AttestOptions, attest} from './attest'
|
||||
export {
|
||||
AttestProvenanceOptions,
|
||||
|
||||
Reference in New Issue
Block a user