Skip to content

Conversation

@tnm
Copy link

@tnm tnm commented Sep 4, 2025

Fixed issue where adding pages configuration to an existing repository would fail with 404 error. The provider now correctly detects when pages are not enabled and uses EnablePages (POST) instead of UpdatePages (PUT).

  • Improved nil check for response object to prevent potential panics
  • Added explicit check for 404 status to determine if pages need enabling
  • Added test for enabling pages on existing repositories

tnm added 2 commits September 4, 2025 02:37
Fixed issue where adding pages configuration to an existing repository
would fail with 404 error. The provider now correctly detects when pages
are not enabled using repo.GetHasPages() and uses EnablePages (POST)
instead of UpdatePages (PUT).

- Use repo.GetHasPages() to check if pages are enabled
- Call EnablePages for repos without pages, UpdatePages for repos with pages
- Added comprehensive test for enabling pages on existing repositories

Fixes integrations#777
@tnm
Copy link
Author

tnm commented Sep 4, 2025

@claude review

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