-
Notifications
You must be signed in to change notification settings - Fork 138
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 Pages Project and Domains #476
Draft
Cyb3r-Jak3
wants to merge
14
commits into
cloudflare:master
Choose a base branch
from
Cyb3r-Jak3:pages-project-domain
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
973b45f
Add pages_project generator and importer
Cyb3r-Jak3 c2b012a
Add pages domain generator
Cyb3r-Jak3 99cf807
Merge branch 'master' into pages-project-domain
Cyb3r-Jak3 b07f049
Remove testing file
Cyb3r-Jak3 b4b49db
Fix formatting on import file
Cyb3r-Jak3 b9d9712
Update test data
Cyb3r-Jak3 439eaa3
Fix typo of resource name
Cyb3r-Jak3 b8e0246
Fix URL used with test
Cyb3r-Jak3 6436e45
Fix test response body
Cyb3r-Jak3 dce9aab
Update actions versions
Cyb3r-Jak3 8f1907c
Add verbose default to debug for testing
Cyb3r-Jak3 ac406cc
Change test data path
Cyb3r-Jak3 3cc3682
Fix URL
Cyb3r-Jak3 b84eed0
fix file extension to mock correctly
jacobbednarz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i a bit confused here. why do we fetch all the pages projects and then iterate all of them to get pages domains?
ideally, these methods should fetch all the results from a single endpoint and use that to dump the output. we shouldn't need to make additional calls or build other structs in order to generate a single resource output.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is needed because there is no endpoint to list all Pages Domains. The endpoint to list pages domains (https://api.cloudflare.com/#pages-domains-get-domains) requires a parameter of the project name, so I need to list all projects to then go through and get all domains.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi! I just started using this tool and this is a missing feature I'd like to have. Is it possible to set the domain as a variable, instead of looking for every domain?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The purpose of generating is to get all the possible resources for output.
As an FYI, I haven't worked on in this in a while as I've run into issues with the pages project part.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking it could be alike to the DNS resources: I have to call it for each zone separately.
So if it worked like the DNS resources, I would just call it per domain.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The API doesn't work that way. DNS records are zone level which are seperated. Pages are account level resources, so they include all domains for all zones in the account.