Skip to content

Commit

Permalink
Merge pull request #1803 from intuit/upload-assets-canary
Browse files Browse the repository at this point in the history
make canary assets tag at the start of history to avoid tag calculation bugs
  • Loading branch information
hipstersmoothie authored Feb 12, 2021
2 parents f0cb6e2 + 1b9daca commit 0efae8f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions plugins/upload-assets/__tests__/upload-assets-ci.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ describe("Upload Assets Plugin", () => {
prefixRelease: (v) => v,
git: {
options,
getFirstCommit: () => 'abc',
addToPrBody,
github: {
repos: { uploadReleaseAsset, createRelease },
Expand Down
3 changes: 3 additions & 0 deletions plugins/upload-assets/__tests__/upload-assets.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ describe("Upload Assets Plugin", () => {
logger: dummyLog(),
prefixRelease: (v) => v,
git: {
getFirstCommit: () => 'abc',
options,
github: {
repos: { uploadReleaseAsset, createRelease },
Expand Down Expand Up @@ -192,6 +193,7 @@ describe("Upload Assets Plugin", () => {
prefixRelease: (v) => v,
git: {
options,
getFirstCommit: () => 'abc',
github: {
repos: { uploadReleaseAsset, createRelease },
paginate: jest.fn().mockResolvedValue([]),
Expand Down Expand Up @@ -226,6 +228,7 @@ describe("Upload Assets Plugin", () => {
prefixRelease: (v) => v,
git: {
options,
getFirstCommit: () => 'abc',
github: {
repos: { uploadReleaseAsset, createRelease },
paginate: jest.fn().mockResolvedValue([]),
Expand Down
1 change: 1 addition & 0 deletions plugins/upload-assets/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ export default class UploadAssetsPlugin implements IPlugin {
name: "Canary Assets",
prerelease: true,
body: `This release contains preview assets of Pull Requests.`,
target_commitish: await auto.git?.getFirstCommit()
});

return canaryRelease.data;
Expand Down

0 comments on commit 0efae8f

Please sign in to comment.