Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add removeArtifacts #109

Merged
merged 1 commit into from Sep 6, 2021
Merged

Add removeArtifacts #109

merged 1 commit into from Sep 6, 2021

Conversation

Rosalie241
Copy link
Contributor

it seems like this works fine though I'm still not experienced with typescript/javascript so feedback is welcome.

Closes #108

@ncipollo
Copy link
Owner

ncipollo commented Sep 1, 2021

Hey @Rosalie241,
Thanks for the PR!! I'll take a closer look when I get a chance later this week, but in the meantime, would you be able to also update tests (Inputs.test.ts and ArtifactUploader.test.ts`)?

@Rosalie241
Copy link
Contributor Author

Hey @Rosalie241,
Thanks for the PR!! I'll take a closer look when I get a chance later this week, but in the meantime, would you be able to also update tests (Inputs.test.ts and ArtifactUploader.test.ts`)?

Done, tests should pass now, though I wasn't sure how to exactly add/test removeArtifacts in ArtifactUploader.test.ts so I left that alone for now.

Copy link
Owner

@ncipollo ncipollo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look good, we just need to update the ArtifactUploader test now. Here are the steps I'd take to update that test:

  1. Add a new argument to the test method which creates the artifact upload - removes. This method can be found here
    function createUploader(replaces: boolean, throws: boolean = false): GithubArtifactUploader {
  2. Pass this new argument into the constructor for ArtifactUploader in the test.
  3. Copy the replaces all artifacts test. Name the new test removes all artifacts. That test can be found here:
    it('replaces all artifacts', async () => {
  4. Update the new test so it sets your flag instead of the replaces flag. I think you can leave the body of the test mostly the same. This will just verify that the uploader will delete all of the existing artifacts.

@Rosalie241
Copy link
Contributor Author

added & pushed

Copy link
Owner

@ncipollo ncipollo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thanks for the PR!! I'll do some additional testing next week then cut a new release with these changes in it.

@ncipollo ncipollo merged commit f597c8a into ncipollo:main Sep 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow all artifacts to be removed before updating release
2 participants