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

Update to 5.45.0 from usptream #13

Merged
merged 344 commits into from
Jun 11, 2024
Merged

Update to 5.45.0 from usptream #13

merged 344 commits into from
Jun 11, 2024

Conversation

snovikov
Copy link

Resolves #ISSUE_NUMBER


Behavior

Before the change?

After the change?

Other information


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

phillebaba and others added 30 commits June 15, 2023 11:26
* Add new datasource to get GitHub App token

* Add new datasource to get GitHub App token

* Fix merge error

---------

Co-authored-by: Keegan Campbell <[email protected]>
Bumps [golang.org/x/oauth2](https://github.com/golang/oauth2) from 0.8.0 to 0.9.0.
- [Commits](golang/oauth2@v0.8.0...v0.9.0)

---
updated-dependencies:
- dependency-name: golang.org/x/oauth2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [github.com/google/go-github/v53](https://github.com/google/go-github) from 53.0.0 to 53.1.0.
- [Release notes](https://github.com/google/go-github/releases)
- [Commits](google/go-github@v53.0.0...v53.1.0)

---
updated-dependencies:
- dependency-name: github.com/google/go-github/v53
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
…asource (integrations#1715)

* Add new resource github_repository_deployment_branch_policy

* Implement data source

* Add link

* Fix bad merge

---------

Co-authored-by: Keegan Campbell <[email protected]>
…ions#1750)

Currently when the user does not authenticate the provider, refreshing a GithubRepository resource drops it from the
state, which is unexpected and very confusing.

The root cause of this is: when AnonymousHTTPClient is used, owner == "" and this causes resourceGithubRepositoryRead to
issue requests to non-existent URLs such as https://github.com//myrepo and subsequently interpret 404 as a reason to
drop the resource from the state.

The suggested fix consults the resource data to infer the appropriate owner to use instead of the empty owner.

Co-authored-by: Keegan Campbell <[email protected]>
…ntegrations#1700)

* feat: Add GitHub organization custom role resource

This commit adds a new Terraform resource for creating, reading, updating and deleting GitHub organization custom roles. The `resourceGithubOrganizationCustomRole` function is added to the `github/provider.go` file. The function creates a new schema with four fields: name, base_role, permissions and description. It also includes functions for create, read, update and delete operations on the resource.

A new data source is also added in this commit that allows users to query an existing custom repository role by its name. The `dataSourceGithubOrganizationCustomRole` function is added to the `github/data_source_github_organization_custom_role.go` file.

Finally, a test case is included in the `github/data_source_github_organization_custom_role_test.go` file that tests querying of an existing custom repository role using the newly created data source.

* refactor: Update test and resource files for Github Organization Custom Role

This commit updates the formatting of the test and resource files for Github Organization Custom Role. It also removes the ForceNew attribute from one of the required fields in the resource file and updates the tests to reflect it.

* docs: Fix arguments for organization custom role

This commit fixes the arguments for creating an organization custom role.

* docs: Update documentation with organization_custom_role

Updates to the documentation to reflect this change.

* docs: Fix errant parenthesis

* Fix bad merge

---------

Co-authored-by: Keegan Campbell <[email protected]>
Tested in reality, works well after the fix :)
…rations#1759)

Fixes a regression used when trying to create/update a dependabot
organization secret. List is an `int` so cannot be cast to a different
type. We therefore double convert it.

There was a regression introduced by version 5.27. This
happened as the go-github client moved over to using int64 as ids in
v53.0.0

```hcl
terraform {
  required_providers {
    github = {
      source = "integrations/github"
      version = "5.27.0"
    }
  }
}

provider "github" {
  owner = var.owner
}

variable "owner" {
  type = string
}

resource "github_repository" "example" {
  name        = "example"
  description = "My awesome codebase"
  visibility = "public"
}

resource "github_dependabot_organization_secret" "example" {
  secret_name     = "example"
  visibility      = "selected"
  plaintext_value = "anything"
  selected_repository_ids = [
    github_repository.example.repo_id,
  ]
}
```
…ntegrations#1756)

* set full_name new computed on name change & add tests

* Run go fmt ./...

---------

Co-authored-by: Keegan Campbell <[email protected]>
* add github_codespaces_secret

* use repository as repoName

* add github_codespaces_organization_secret

* add github_codespaces_user_secret

* fix version

* add docs

* fix id conversion

* add codespaces_*public_key data source

* switch back to use of name/full_name

* update org test

* update repo test

* remove user secret visibiltiy prop & update tests

---------

Co-authored-by: Keegan Campbell <[email protected]>
* add ability to import for actions/codespaces/dependabot secrets

* update documentation
…tegrations#1754)

* fix rename issue & add tests

* fix rename issue & add tests

* fix rename issue & add tests

* remove main.tf

---------

Co-authored-by: Keegan Campbell <[email protected]>
…rations#1772)

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.50.1 to 1.53.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](grpc/grpc-go@v1.50.1...v1.53.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ions#1784)

Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.10.0 to 0.11.0.
- [Commits](golang/crypto@v0.10.0...v0.11.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Keegan Campbell <[email protected]>
* Don't run go mod tidy on release

* Be more specific about releases
…ons#1785)

Bumps [golang.org/x/oauth2](https://github.com/golang/oauth2) from 0.9.0 to 0.10.0.
- [Commits](golang/oauth2@v0.9.0...v0.10.0)

---
updated-dependencies:
- dependency-name: golang.org/x/oauth2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Keegan Campbell <[email protected]>
- use app_id rather than memory address
- don't mix contexts and checks

Co-authored-by: Keegan Campbell <[email protected]>
…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.
… destroyed (integrations#1783)

* feat: add ability to downgrade membership on destroy

* add docs

* formatting

* formatting

* check membership status before downgrading

* fix lint

* fix lint

* Update github/resource_github_membership.go

Co-authored-by: Keegan Campbell <[email protected]>

---------

Co-authored-by: Keegan Campbell <[email protected]>
dependabot bot and others added 25 commits January 5, 2024 11:11
…ions#2040)

Bumps [golang.org/x/oauth2](https://github.com/golang/oauth2) from 0.14.0 to 0.15.0.
- [Commits](golang/oauth2@v0.14.0...v0.15.0)

---
updated-dependencies:
- dependency-name: golang.org/x/oauth2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Keegan Campbell <[email protected]>
…egrations#2072)

* Use url.PathEscape to encode environment names instead of url.QueryEscape

* Update all environment tests to include spaces in environment names

---------

Co-authored-by: Keegan Campbell <[email protected]>
Resolves regressions integrations#2008 and integrations#2014 introduced in integrations#1029

Signed-off-by: Marco Nenciarini <[email protected]>
Co-authored-by: Keegan Campbell <[email protected]>
* [FEAT]: Get the license for a repository

* Remove unneeded option

* Update documentation for repository license

* Add test for license

* Fix test for github repository license

* Bump go-github from v52 to v55 in the resource_github_issue_labels

* Rename repositorylicense to repository_license

---------

Co-authored-by: Nick Floyd <[email protected]>
Co-authored-by: Keegan Campbell <[email protected]>
* Bump go-github to v57

* Remove deprecated methods to resolve linting errors
The contexts attribute can contain multiple variations of strings that
are not documented clearly. These variations differ greatly depending on
the usecase, including:
- Typical usage with name/id
- Appending matrix value(s)
- Utilising reusable workflows.
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.17.0 to 0.18.0.
- [Commits](golang/crypto@v0.17.0...v0.18.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [golang.org/x/oauth2](https://github.com/golang/oauth2) from 0.15.0 to 0.16.0.
- [Commits](golang/oauth2@v0.15.0...v0.16.0)

---
updated-dependencies:
- dependency-name: golang.org/x/oauth2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
GitHub repository file documentation improvement
Update branch protection documentation
Add `required_workflows` to `github_organization_ruleset`
# Conflicts:
#	.github/workflows/add_to_octokit_project.yml
#	github/resource_github_team.go
@snovikov snovikov self-assigned this Jun 11, 2024
@snovikov snovikov requested a review from a team June 11, 2024 11:45
@snovikov snovikov merged commit 66d27bd into main Jun 11, 2024
1 check passed
@snovikov snovikov deleted the update-5.45.0 branch June 11, 2024 13:50
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.