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

[bug]: Fix commit strategies when updating repos #1890

Merged

Conversation

SotaNakajima
Copy link
Contributor

@SotaNakajima SotaNakajima commented Sep 12, 2023

Heyo 👋

Resolves #1889


Before the change?

  • Modified commit strategies do not get properly applied

DEBUG OUTPUT:

2023-09-12T13:25:02.659-0700 [DEBUG] provider.terraform-provider-github_v5.36.0: ---[ REQUEST ]---------------------------------------
2023-09-12T13:25:02.659-0700 [DEBUG] provider.terraform-provider-github_v5.36.0: PATCH /repos/some-org/some-repo HTTP/1.1
2023-09-12T13:25:02.659-0700 [DEBUG] provider.terraform-provider-github_v5.36.0: Host: api.github.com
2023-09-12T13:25:02.659-0700 [DEBUG] provider.terraform-provider-github_v5.36.0: User-Agent: go-github/v54.0.0
2023-09-12T13:25:02.659-0700 [DEBUG] provider.terraform-provider-github_v5.36.0: Content-Length: 467
2023-09-12T13:25:02.659-0700 [DEBUG] provider.terraform-provider-github_v5.36.0: Accept: application/vnd.github.baptiste-preview+json, application/vnd.github.nebula-preview+json,application/vnd.github.stone-crop-preview+json
2023-09-12T13:25:02.659-0700 [DEBUG] provider.terraform-provider-github_v5.36.0: Content-Type: application/json
2023-09-12T13:25:02.659-0700 [DEBUG] provider.terraform-provider-github_v5.36.0: X-Github-Api-Version: 2022-11-28
2023-09-12T13:25:02.659-0700 [DEBUG] provider.terraform-provider-github_v5.36.0: Accept-Encoding: gzip
2023-09-12T13:25:02.659-0700 [DEBUG] provider.terraform-provider-github_v5.36.0: 
2023-09-12T13:25:02.659-0700 [DEBUG] provider.terraform-provider-github_v5.36.0: {
2023-09-12T13:25:02.659-0700 [DEBUG] provider.terraform-provider-github_v5.36.0:  "name": "some-repo",
2023-09-12T13:25:02.659-0700 [DEBUG] provider.terraform-provider-github_v5.36.0:  "description": "example",
2023-09-12T13:25:02.659-0700 [DEBUG] provider.terraform-provider-github_v5.36.0:  "homepage": "",
2023-09-12T13:25:02.659-0700 [DEBUG] provider.terraform-provider-github_v5.36.0:  "auto_init": false,
2023-09-12T13:25:02.659-0700 [DEBUG] provider.terraform-provider-github_v5.36.0:  "allow_rebase_merge": false,
2023-09-12T13:25:02.659-0700 [DEBUG] provider.terraform-provider-github_v5.36.0:  "allow_update_branch": false,
2023-09-12T13:25:02.659-0700 [DEBUG] provider.terraform-provider-github_v5.36.0:  "allow_squash_merge": true,
2023-09-12T13:25:02.659-0700 [DEBUG] provider.terraform-provider-github_v5.36.0:  "allow_merge_commit": true,
2023-09-12T13:25:02.659-0700 [DEBUG] provider.terraform-provider-github_v5.36.0:  "allow_auto_merge": false,
2023-09-12T13:25:02.659-0700 [DEBUG] provider.terraform-provider-github_v5.36.0:  "delete_branch_on_merge": false,
2023-09-12T13:25:02.659-0700 [DEBUG] provider.terraform-provider-github_v5.36.0:  "archived": false,
2023-09-12T13:25:02.659-0700 [DEBUG] provider.terraform-provider-github_v5.36.0:  "has_issues": false,
2023-09-12T13:25:02.659-0700 [DEBUG] provider.terraform-provider-github_v5.36.0:  "has_wiki": false,
2023-09-12T13:25:02.659-0700 [DEBUG] provider.terraform-provider-github_v5.36.0:  "has_projects": false,
2023-09-12T13:25:02.659-0700 [DEBUG] provider.terraform-provider-github_v5.36.0:  "has_downloads": false,
2023-09-12T13:25:02.659-0700 [DEBUG] provider.terraform-provider-github_v5.36.0:  "has_discussions": false,
2023-09-12T13:25:02.659-0700 [DEBUG] provider.terraform-provider-github_v5.36.0:  "is_template": false,
2023-09-12T13:25:02.659-0700 [DEBUG] provider.terraform-provider-github_v5.36.0:  "license_template": "",
2023-09-12T13:25:02.659-0700 [DEBUG] provider.terraform-provider-github_v5.36.0:  "gitignore_template": ""
2023-09-12T13:25:02.659-0700 [DEBUG] provider.terraform-provider-github_v5.36.0: }

After the change?

  • Modified commit strategies properly get applied :)

DEBUG OUTPUT:


2023-09-12T16:33:00.249-0700 [DEBUG] Provider registry.terraform.io/integrations/github is overridden by dev_overrides
╷
│ Warning: Provider development overrides are in effect
│ 
│ The following provider development overrides are set in the CLI
│ configuration:
│  - integrations/github in /tmp/go/bin
│ 
│ The behavior may therefore not match any released version of the provider
│ and applying changes may cause the state to become incompatible with
│ published releases.
...
2023-09-12T16:35:27.587-0700 [DEBUG] provider.terraform-provider-github: {
2023-09-12T16:35:27.587-0700 [DEBUG] provider.terraform-provider-github:  "name": "some-repo",
2023-09-12T16:35:27.587-0700 [DEBUG] provider.terraform-provider-github:  "description": "example",
2023-09-12T16:35:27.587-0700 [DEBUG] provider.terraform-provider-github:  "homepage": "",
2023-09-12T16:35:27.587-0700 [DEBUG] provider.terraform-provider-github:  "auto_init": false,
2023-09-12T16:35:27.587-0700 [DEBUG] provider.terraform-provider-github:  "allow_rebase_merge": false,
2023-09-12T16:35:27.587-0700 [DEBUG] provider.terraform-provider-github:  "allow_update_branch": false,
2023-09-12T16:35:27.587-0700 [DEBUG] provider.terraform-provider-github:  "allow_squash_merge": true,
2023-09-12T16:35:27.587-0700 [DEBUG] provider.terraform-provider-github:  "allow_merge_commit": true,
2023-09-12T16:35:27.587-0700 [DEBUG] provider.terraform-provider-github:  "allow_auto_merge": false,
2023-09-12T16:35:27.587-0700 [DEBUG] provider.terraform-provider-github:  "delete_branch_on_merge": false,
2023-09-12T16:35:27.587-0700 [DEBUG] provider.terraform-provider-github:  "squash_merge_commit_title": "PR_TITLE",
2023-09-12T16:35:27.587-0700 [DEBUG] provider.terraform-provider-github:  "squash_merge_commit_message": "COMMIT_MESSAGES",
2023-09-12T16:35:27.587-0700 [DEBUG] provider.terraform-provider-github:  "merge_commit_title": "MERGE_MESSAGE",
2023-09-12T16:35:27.588-0700 [DEBUG] provider.terraform-provider-github:  "merge_commit_message": "PR_TITLE",
2023-09-12T16:35:27.588-0700 [DEBUG] provider.terraform-provider-github:  "archived": false,
2023-09-12T16:35:27.588-0700 [DEBUG] provider.terraform-provider-github:  "has_issues": false,
2023-09-12T16:35:27.588-0700 [DEBUG] provider.terraform-provider-github:  "has_wiki": false,
2023-09-12T16:35:27.588-0700 [DEBUG] provider.terraform-provider-github:  "has_projects": false,
2023-09-12T16:35:27.588-0700 [DEBUG] provider.terraform-provider-github:  "has_downloads": false,
2023-09-12T16:35:27.588-0700 [DEBUG] provider.terraform-provider-github:  "has_discussions": false,
2023-09-12T16:35:27.588-0700 [DEBUG] provider.terraform-provider-github:  "is_template": false,
2023-09-12T16:35:27.588-0700 [DEBUG] provider.terraform-provider-github:  "license_template": "",
2023-09-12T16:35:27.588-0700 [DEBUG] provider.terraform-provider-github:  "gitignore_template": ""
2023-09-12T16:35:27.588-0700 [DEBUG] provider.terraform-provider-github: }

Pull request checklist

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)

Does this introduce a breaking change?

Please see our docs on breaking changes to help!

  • Yes
  • No

Copy link
Contributor

@nickfloyd nickfloyd left a comment

Choose a reason for hiding this comment

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

Thank you for getting this knocked out @SotaNakajima

@nickfloyd nickfloyd added the Type: Bug Something isn't working as documented label Sep 27, 2023
@nickfloyd nickfloyd changed the title fix: Fix commit strategies when updating repos [bug]: Fix commit strategies when updating repos Sep 27, 2023
@nickfloyd nickfloyd merged commit 6d97704 into integrations:main Sep 27, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working as documented
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG]: Commit strategies are not properly applied
2 participants