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

ENH Fetch respositories.json from raw.githubusercontent.com #30

Merged

Conversation

emteknetnz
Copy link
Member

@emteknetnz emteknetnz commented May 8, 2024

@GuySartorelli
Copy link
Member

GuySartorelli commented May 8, 2024

I don't think this is useful for any of the repos using it other than Rhino:

The only item this might be useful for is Rhino. So I'd suggest either we only do this for Rhino (in which case we don't do it in this repo at all), or we just leave rhino as it currently is for a bit and see if it gets annoying. I don't think it will get annoying to redeploy Rhino when we add new repos, because:

  1. We don't update the list very often
  2. Ideally we get Rhino to auto-deploy when PRs get merged at some point, which reduces the steps required to get the changes in

@emteknetnz
Copy link
Member Author

Chatted offline, will proceed with this PR

@@ -6,6 +6,8 @@

final class MetaData
{
public static $isRunningUnitTests = false;
Copy link
Member

@GuySartorelli GuySartorelli May 8, 2024

Choose a reason for hiding this comment

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

We should ideally either use a global constant, or better yet have a property for the path set to 'https://raw.githubusercontent.com/silverstripe/supported-modules/main/repositories.json' by default but which unit tests set to the path of the raw file in this repo.
Or for the cleanest and most standard way, mock the request in the unit test.

That said, it's probably not worth doing another round of review for my perfectionism :p This works well enough.

Copy link
Member

@GuySartorelli GuySartorelli left a comment

Choose a reason for hiding this comment

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

Good enough to merge

@GuySartorelli GuySartorelli merged commit 4018d30 into silverstripe:main May 8, 2024
8 checks passed
@GuySartorelli GuySartorelli deleted the pulls/main/dynamic-fetch branch May 8, 2024 23:04
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.

2 participants