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

feat(source): added a configuration source #94

Open
wants to merge 25 commits into
base: main
Choose a base branch
from

Conversation

charlie430
Copy link

@charlie430 charlie430 commented May 22, 2023

This PR adds a source option to control which api was use to fetch the published versions. #93 #72

However, other enhancements were needed to make this work, so the following is the complete list of enhancements and changes made.

  1. Added a source option; controls which url to use when fetching the published versions.
  2. Added a json-path option; controls the json path expression used to parse the versions from the response payload.
  3. Added a fail-when-found option; throws an exception if the version is found.
  4. Refactored classes and documentation to make the action agnostic to the package repository (i.e. not NuGet specific).
    • NuGet is the default source (nuget)
    • NPM source can also be specified (npm)
    • Custom url can be specified (http://some-repository.org/PACKAGE-NAME)
  5. Output variable renamed from nuget-exists to package-exists
  6. Added logic to not fail if the GITHUB_OUTPUT environment variable is not specified and log a warning

@charlie430 charlie430 marked this pull request as ready for review May 24, 2023 17:55
@CalvinWilkinson
Copy link
Member

@charlie430 Thanks for your contribution!!

I apologize that I just saw this now. I did not get a message in my notification system; for some reason, it got deleted with the large amounts of notifications I get throughout the organization.

GitHub's notification system is pretty bad and this has been an issue. I plan on implementing something so I can make sure I catch these.

Though I appreciate the contribution, I do wish you would have reached out to me 😀. If you do plan on contributing to any other projects within the organization, which you are welcome to, please make sure to check out the contribution guide and contact a maintainer. This is always good practice with open source. This makes sure that you are following the process for that project.

I do understand though that you probably needed this quickly for whatever reason. But I might have been able to just implement the feature for you.

But either way, no harm done!!

I will put some time aside and overlook this pull request to see if this is something I can implement myself. I can possibly pull apart some of what you implemented and make it into something that I can release.

Note I have not checked out the code changes yet!!

Feel free to reach out to me on Discord if you want to talk about what it is you need in more detail and we can probably get it in the original repo and do a release for you!!

@charlie430
Copy link
Author

Hey Calvin,

Yes, I needed it pretty quickly. I really liked the project and the way it was organized and tested, and thought I needed just a small change but it quickly morphed into a more in depth refactor. Let me know if you have any questions. If you end up not merging it in, no worries. I can continue to use my personal repository.

Best,
Charlie

@CalvinWilkinson
Copy link
Member

Hey Calvin,

Yes, I needed it pretty quickly. I really liked the project and the way it was organized and tested, and thought I needed just a small change but it quickly morphed into a more in-depth refactor. Let me know if you have any questions. If you end up not merging it in, no worries. I can continue to use my personal repository.

Best, Charlie

I will absolutely update this and do a release!! I just need to get some time is all. 😀

@CalvinWilkinson CalvinWilkinson self-assigned this Oct 29, 2023
@CalvinWilkinson CalvinWilkinson added ✨new-feature New feature that does not exist and removed ✨new-feature New feature that does not exist labels Oct 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ⚪Not Set
Development

Successfully merging this pull request may close these issues.

2 participants