Skip to content

Commit

Permalink
Support passing uploadId.
Browse files Browse the repository at this point in the history
  • Loading branch information
nichtverstehen committed Feb 28, 2024
1 parent d618eeb commit 216dce9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
9 changes: 6 additions & 3 deletions dist/merge/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -917,11 +917,12 @@ class CreateArtifactResponse$Type extends runtime_5.MessageType {
constructor() {
super("github.actions.results.api.v1.CreateArtifactResponse", [
{ no: 1, name: "ok", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
{ no: 2, name: "signed_upload_url", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
{ no: 2, name: "signed_upload_url", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
{ no: 3, name: "upload_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
]);
}
create(value) {
const message = { ok: false, signedUploadUrl: "" };
const message = { ok: false, signedUploadUrl: "", uploadId: "" };
globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== undefined)
(0, runtime_3.reflectionMergePartial)(this, message, value);
Expand Down Expand Up @@ -976,10 +977,11 @@ class FinalizeArtifactRequest$Type extends runtime_5.MessageType {
{ no: 4, name: "size", kind: "scalar", T: 3 /*ScalarType.INT64*/ },
{ no: 5, name: "hash", kind: "message", T: () => wrappers_2.StringValue },
{ no: 6, name: "etag", kind: "scalar", T: 9 },
{ no: 6, name: "upload_id", kind: "scalar", T: 9 },
]);
}
create(value) {
const message = { workflowRunBackendId: "", workflowJobRunBackendId: "", name: "", size: "0", etag: "" };
const message = { workflowRunBackendId: "", workflowJobRunBackendId: "", name: "", size: "0", etag: "", uploadId: "" };
globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== undefined)
(0, runtime_3.reflectionMergePartial)(this, message, value);
Expand Down Expand Up @@ -3704,6 +3706,7 @@ function uploadArtifact(name, files, rootDirectory, options) {
name,
size: uploadResult.uploadSize ? uploadResult.uploadSize.toString() : '0',
etag: (_a = uploadResult.uploadEtag) !== null && _a !== void 0 ? _a : '',
uploadId: createArtifactResp.uploadId,
};
if (uploadResult.sha256Hash) {
finalizeArtifactReq.hash = generated_1.StringValue.create({
Expand Down
9 changes: 6 additions & 3 deletions dist/upload/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -917,11 +917,12 @@ class CreateArtifactResponse$Type extends runtime_5.MessageType {
constructor() {
super("github.actions.results.api.v1.CreateArtifactResponse", [
{ no: 1, name: "ok", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
{ no: 2, name: "signed_upload_url", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
{ no: 2, name: "signed_upload_url", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
{ no: 3, name: "upload_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
]);
}
create(value) {
const message = { ok: false, signedUploadUrl: "" };
const message = { ok: false, signedUploadUrl: "", uploadId: "" };
globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== undefined)
(0, runtime_3.reflectionMergePartial)(this, message, value);
Expand Down Expand Up @@ -976,10 +977,11 @@ class FinalizeArtifactRequest$Type extends runtime_5.MessageType {
{ no: 4, name: "size", kind: "scalar", T: 3 /*ScalarType.INT64*/ },
{ no: 5, name: "hash", kind: "message", T: () => wrappers_2.StringValue },
{ no: 6, name: "etag", kind: "scalar", T: 9 },
{ no: 6, name: "upload_id", kind: "scalar", T: 9 },
]);
}
create(value) {
const message = { workflowRunBackendId: "", workflowJobRunBackendId: "", name: "", size: "0", etag: "" };
const message = { workflowRunBackendId: "", workflowJobRunBackendId: "", name: "", size: "0", etag: "", uploadId: "" };
globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== undefined)
(0, runtime_3.reflectionMergePartial)(this, message, value);
Expand Down Expand Up @@ -3704,6 +3706,7 @@ function uploadArtifact(name, files, rootDirectory, options) {
name,
size: uploadResult.uploadSize ? uploadResult.uploadSize.toString() : '0',
etag: (_a = uploadResult.uploadEtag) !== null && _a !== void 0 ? _a : '',
uploadId: createArtifactResp.uploadId,
};
if (uploadResult.sha256Hash) {
finalizeArtifactReq.hash = generated_1.StringValue.create({
Expand Down

0 comments on commit 216dce9

Please sign in to comment.