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

refactor: check that project exists #22

Merged
merged 1 commit into from
Oct 9, 2024
Merged

refactor: check that project exists #22

merged 1 commit into from
Oct 9, 2024

Conversation

rndquu
Copy link
Member

@rndquu rndquu commented Oct 9, 2024

Check this CI run which fails with the A project with this name already exists. Choose a different project name..

Here we checked that project exists via this API GET /accounts/$CLOUDFLARE_ACCOUNT_ID/pages/projects which returns paginated projects. In this case pay-ubq-fi is no longer on the 1st paganation page hence the script tried to create a new project although it already exists but displayed on page 2.

This PR checks that project exists by using another API GET /accounts/$CLOUDFLARE_ACCOUNT_ID/pages/projects/$PROJECT_NAME which fetches project details directly.

@rndquu rndquu merged commit 296eff3 into main Oct 9, 2024
2 checks passed
@rndquu rndquu deleted the rndquu-patch-1 branch October 9, 2024 22:06
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.

1 participant