Skip to content

Suppress plan diff when github_repository changes to archived#1326

Merged
kfcampbell merged 3 commits intointegrations:mainfrom
kangaechu:fix-plan-diff-when-github_repository-is-archived
Oct 27, 2022
Merged

Suppress plan diff when github_repository changes to archived#1326
kfcampbell merged 3 commits intointegrations:mainfrom
kangaechu:fix-plan-diff-when-github_repository-is-archived

Conversation

@kangaechu
Copy link
Copy Markdown
Contributor

@kangaechu kangaechu commented Oct 13, 2022

Closes #1325

GitHub GET /repos/{owner}/{repo} API doesn't return some properties when repository is archived. https://docs.github.com/en/rest/repos/repos#get-a-repository

The difference between the results of running the API in the active repository and archived repositories is as follows:

  • allow_auto_merge
  • allow_merge_commit
  • allow_rebase_merge
  • allow_squash_merge
  • allow_update_branch (not defined in resource_github_repository.go)
  • delete_branch_on_merge
  • merge_commit_message
  • merge_commit_title
  • squash_merge_commit_message
  • squash_merge_commit_title
  • use_squash_pr_title_as_default (not defined in resource_github_repository.go)

https://gist.github.com/kangaechu/6cfaaf358bdda6726220f0248108b1fc

Therefore, I modified not to set these properties when target repository is already archived.

Closes integrations#1325

GitHub GET /repos/{owner}/{repo} API doesn't return some properties when repository is archived.
https://docs.github.com/en/rest/repos/repos#get-a-repository

The difference between the results of running the API in the active repository and archived repositories is as follows:

- allow_auto_merge
- allow_merge_commit
- allow_rebase_merge
- allow_squash_merge
- allow_update_branch (not defined in this code)
- delete_branch_on_merge
- merge_commit_message
- merge_commit_title
- squash_merge_commit_message
- squash_merge_commit_title
- use_squash_pr_title_as_default (not defined in this code)

Therefore, I modified not to set these properties when target repository is already archived.
@kfcampbell
Copy link
Copy Markdown
Contributor

This looks good, thank you! I'll shoot to get this into a release soon.

@kfcampbell kfcampbell merged commit 7dfb5d2 into integrations:main Oct 27, 2022
@kangaechu kangaechu deleted the fix-plan-diff-when-github_repository-is-archived branch November 5, 2022 07:21
kazaker pushed a commit to auto1-oss/terraform-provider-github that referenced this pull request Dec 28, 2022
…ations#1326)

Closes integrations#1325

GitHub GET /repos/{owner}/{repo} API doesn't return some properties when repository is archived.
https://docs.github.com/en/rest/repos/repos#get-a-repository

The difference between the results of running the API in the active repository and archived repositories is as follows:

- allow_auto_merge
- allow_merge_commit
- allow_rebase_merge
- allow_squash_merge
- allow_update_branch (not defined in this code)
- delete_branch_on_merge
- merge_commit_message
- merge_commit_title
- squash_merge_commit_message
- squash_merge_commit_title
- use_squash_pr_title_as_default (not defined in this code)

Therefore, I modified not to set these properties when target repository is already archived.

Co-authored-by: Drift Check Updater <gh_actions_drift_check_updater@example.com>
Co-authored-by: Keegan Campbell <me@kfcampbell.com>
avidspartan1 pushed a commit to avidspartan1/terraform-provider-github that referenced this pull request Feb 5, 2024
…ations#1326)

Closes integrations#1325

GitHub GET /repos/{owner}/{repo} API doesn't return some properties when repository is archived.
https://docs.github.com/en/rest/repos/repos#get-a-repository

The difference between the results of running the API in the active repository and archived repositories is as follows:

- allow_auto_merge
- allow_merge_commit
- allow_rebase_merge
- allow_squash_merge
- allow_update_branch (not defined in this code)
- delete_branch_on_merge
- merge_commit_message
- merge_commit_title
- squash_merge_commit_message
- squash_merge_commit_title
- use_squash_pr_title_as_default (not defined in this code)

Therefore, I modified not to set these properties when target repository is already archived.

Co-authored-by: Drift Check Updater <gh_actions_drift_check_updater@example.com>
Co-authored-by: Keegan Campbell <me@kfcampbell.com>
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.

A plan diff happens after archiving repository

2 participants