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

Do not change allow_update_branch/has_downloads on archived repos #1795

Merged
merged 1 commit into from
Jul 14, 2023
Merged

Do not change allow_update_branch/has_downloads on archived repos #1795

merged 1 commit into from
Jul 14, 2023

Conversation

kristian-lesko
Copy link
Contributor

@kristian-lesko kristian-lesko commented Jul 14, 2023

Avoid causing a permanent plan diff by attempting to change attributes that can no longer be modified if a repository is archived.

Resolves #1793.


Behavior

Before the change?

The has_downloads and allow_update_branch attributes are attempted to be changed on archived repositories, which silently succeeds but doesn't actually change anything (since it's not allowed if a repository is archived). This causes a permanent configuration drift to be reported by terraform plan in some cases.

After the change?

The has_downloads and allow_update_branch attributes are only set on repositories that are not archived.


Additional info

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)
  • Added the appropriate label for the given change

Does this introduce a breaking change?

Please see our docs on breaking changes to help!

  • Yes (Please add the Type: Breaking change label)
  • No

If Yes, what's the impact:

  • N/A

Pull request type

Please add the corresponding label for change this PR introduces:

  • Bugfix: Type: Bug
  • Feature/model/API additions: Type: Feature
  • Updates to docs or samples: Type: Documentation
  • Dependencies/code cleanup: Type: Maintenance

Avoid causing a permanent `plan` diff by attempting to change attributes
that can no longer be modified if a repository is archived.

Fixes #1793.
Copy link
Member

@kfcampbell kfcampbell left a comment

Choose a reason for hiding this comment

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

Thanks!

@kfcampbell kfcampbell merged commit 6f934ec into integrations:main Jul 14, 2023
4 checks passed
doonga pushed a commit to doonga/greyrock-ops that referenced this pull request Jul 15, 2023
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [github](https://registry.terraform.io/providers/integrations/github)
([source](https://togithub.com/integrations/terraform-provider-github))
| required_provider | minor | `5.30.1` -> `5.31.0` |

---

### Release Notes

<details>
<summary>integrations/terraform-provider-github (github)</summary>

###
[`v5.31.0`](https://togithub.com/integrations/terraform-provider-github/releases/tag/v5.31.0)

[Compare
Source](https://togithub.com/integrations/terraform-provider-github/compare/v5.30.1...v5.31.0)

#### What's Changed

- build(deps): bump golang.org/x/oauth2 from 0.9.0 to 0.10.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[integrations/terraform-provider-github#1785
- 💅 Typo in docs by [@&#8203;nmacri](https://togithub.com/nmacri) in
[integrations/terraform-provider-github#1789
- Attempted fix for
[#&#8203;1657](https://togithub.com/integrations/terraform-provider-github/issues/1657)
by [@&#8203;yaakov-h](https://togithub.com/yaakov-h) in
[integrations/terraform-provider-github#1774
- Do not change allow_update_branch/has_downloads on archived repos by
[@&#8203;kristian-lesko](https://togithub.com/kristian-lesko) in
[integrations/terraform-provider-github#1795
- feat: add ability to downgrade membership when `github_membership` is
destroyed by [@&#8203;jsifuentes](https://togithub.com/jsifuentes) in
[integrations/terraform-provider-github#1783

#### New Contributors

- [@&#8203;nmacri](https://togithub.com/nmacri) made their first
contribution in
[integrations/terraform-provider-github#1789
- [@&#8203;yaakov-h](https://togithub.com/yaakov-h) made their first
contribution in
[integrations/terraform-provider-github#1774

**Full Changelog**:
integrations/terraform-provider-github@v5.30.1...v5.31.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi44LjUiLCJ1cGRhdGVkSW5WZXIiOiIzNi44LjUiLCJ0YXJnZXRCcmFuY2giOiJtYWluIn0=-->

Co-authored-by: greyrock-bot <112729691+greyrock-bot[bot]@users.noreply.github.com>
@kristian-lesko kristian-lesko deleted the archived-repos branch July 17, 2023 08:30
jsifuentes pushed a commit to jsifuentes/terraform-provider-github that referenced this pull request Jul 17, 2023
…tegrations#1795)

Avoid causing a permanent `plan` diff by attempting to change attributes
that can no longer be modified if a repository is archived.

Fixes integrations#1793.
felixlut pushed a commit to felixlut/terraform-provider-github that referenced this pull request Jul 22, 2023
…tegrations#1795)

Avoid causing a permanent `plan` diff by attempting to change attributes
that can no longer be modified if a repository is archived.

Fixes integrations#1793.
avidspartan1 pushed a commit to avidspartan1/terraform-provider-github that referenced this pull request Feb 5, 2024
…tegrations#1795)

Avoid causing a permanent `plan` diff by attempting to change attributes
that can no longer be modified if a repository is archived.

Fixes integrations#1793.
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.

[BUG]: Permanent has_downloads/allow_update_branch diff on archived repository
2 participants