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

Replace libkubo's admin to w3dt-stewards #100

Merged
merged 2 commits into from
Jan 5, 2023
Merged

Conversation

Jorropo
Copy link
Contributor

@Jorropo Jorropo commented Jan 5, 2023

Summary

Give w3dt-stewards team maintain permissions to libkubo repository.

Why do you need this?

Kubo maintainters should be able to perform the same actions on libkubo that they can on kubo repository.

What else do we need to know?

n/a

DRI: myself

@Jorropo Jorropo requested review from a team as code owners January 5, 2023 02:44
@github-actions
Copy link
Contributor

github-actions bot commented Jan 5, 2023

Before merge, verify that all the following plans are correct. They will be applied as-is after the merge.

Terraform plans

ipfs

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # github_team_repository.this["w3dt-stewards:libkubo"] will be created
  + resource "github_team_repository" "this" {
      + etag       = (known after apply)
      + id         = (known after apply)
      + permission = "maintain"
      + repository = "libkubo"
      + team_id    = "4656983"
    }

Plan: 1 to add, 0 to change, 0 to destroy.

@galargh
Copy link
Contributor

galargh commented Jan 5, 2023

To add permissions for a team, it has to be specified under the teams (

teams:
) block instead of collaborators (
collaborators:
). I moved giving permissions to w3dt-stewards there.

Also, I restored a description. Descriptions are useful for reviewers but also for anyone in the future that might end up here.

@galargh galargh merged commit 3b057ef into ipfs:master Jan 5, 2023
@Jorropo Jorropo deleted the patch-1 branch January 5, 2023 07:58
@Jorropo
Copy link
Contributor Author

Jorropo commented Jan 5, 2023

@galargh thx but I don't understand the difference, terraform seemed happy with what I originally sent:

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create
  - destroy

Terraform will perform the following actions:

  # github_repository_collaborator.this["libkubo:guseggert"] will be destroyed
  # (because key ["libkubo:guseggert"] is not in for_each map)
  - resource "github_repository_collaborator" "this" {
      - id         = "libkubo:guseggert" -> null
      - permission = "admin" -> null
      - repository = "libkubo" -> null
      - username   = "guseggert" -> null
    }

  # github_repository_collaborator.this["libkubo:w3dt-stewards"] will be created
  + resource "github_repository_collaborator" "this" {
      + id                          = (known after apply)
      + invitation_id               = (known after apply)
      + permission                  = "admin"
      + permission_diff_suppression = false
      + repository                  = "libkubo"
      + username                    = "w3dt-stewards"
    }

Plan: 1 to add, 0 to change, 1 to destroy.

@galargh
Copy link
Contributor

galargh commented Jan 5, 2023

github_repository_collaborator.this["libkubo:w3dt-stewards"] will be created

With the original plan, the apply would have tried to create github_repository_collaborator resource. That resource represents relationship between repositories and users. The apply would have failed because user w3dt-stewards doesn't exist.

We might be able to catch cases like this with some additional checks. I created ipdxco/github-as-code#91 to track this. But, if I'm not mistaken, it is possible to user names and team names do not share a pool so if w3dt-stewards user existed, it would have been a totally valid plan.

github_team_repository.this["w3dt-stewards:libkubo"] will be created

The updated plan proposes creation of github_team_repository resource. This resource represents relationship between repositories and teams. As expected, the apply succeeded because we do have a team called w3dt-stewards.

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.

3 participants