-
Notifications
You must be signed in to change notification settings - Fork 83
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
Set repo visibility #5
Comments
Should this be added to Octoshift instead? Edit: after a conversation with the team, this has already been implemented in Octoshift, and this feature tracks consuming this feature with the CLI! I have updated the issue body to reflect this 👍 |
I do definitely think we should do this. It would be easy to add in the |
<!-- For the checkboxes below you must check each one to indicate that you either did the relevant task, or considered it and decided there was nothing that needed doing --> Implements part of #5 (FINALLY!) - [x] Did you write/update appropriate tests - [x] Release notes updated (if appropriate) - [x] Appropriate logging output - [x] Issue linked - [x] Docs updated (or issue created) - [x] New package licenses are added to `ThirdPartyNotices.txt` (if applicable) This was originally implemented by @tambling in #647 . However there was some back and forth on some design questions and it never got merged, and now that PR/branch is so far behind main I figured it would be easier to just redo the changes in a new branch rather than trying to resolve the merge/rebase conflicts with the previous PR/branch. This adds a `--target-repo-visibility` argument to all 3 `migrate-repo` commands. Octoshift backend already supports this arg in the API's, we just never used it (until now). I will do a separate PR that updates `generate-script`. <!-- For docs we should review the docs at: https://docs.github.com/en/early-access/github/migrating-with-github-enterprise-importer and the README.md in this repo If a doc update is required based on the changes in this PR, it is sufficient to create an issue and link to it here. The doc update can be made later/separately. The process to update the docs can be found here: https://github.com/github/docs-early-access#opening-prs The markdown files are here: https://github.com/github/docs-early-access/tree/main/content/github/migrating-with-github-enterprise-importer -->
<!-- For the checkboxes below you must check each one to indicate that you either did the relevant task, or considered it and decided there was nothing that needed doing --> - [x] Did you write/update appropriate tests - [x] Release notes updated (if appropriate) - [x] Appropriate logging output - [x] Issue linked - [x] Docs updated (or issue created) - [x] New package licenses are added to `ThirdPartyNotices.txt` (if applicable) Closes #5 Updated all 3 `generate-script` commands to always include the `--target-repo-visibility` arg. For `gei` it will inspect the source-repo and set the value appropriately in the script. For `ado2gh` and `bbs2gh` it will always set the value to `private`. Originally I added a separate function `GithubApi.GetRepoVisibility()` but this resulted in an API call per repo when generating the script which made it significantly slower for large orgs. The API we already call to get the list of repos also returns the visibility, so I updated `GithubApi.GetRepos()` to return a tuple with repo name and visibility. <!-- For docs we should review the docs at: https://docs.github.com/en/early-access/github/migrating-with-github-enterprise-importer and the README.md in this repo If a doc update is required based on the changes in this PR, it is sufficient to create an issue and link to it here. The doc update can be made later/separately. The process to update the docs can be found here: https://github.com/github/docs-early-access#opening-prs The markdown files are here: https://github.com/github/docs-early-access/tree/main/content/github/migrating-with-github-enterprise-importer --> --------- Co-authored-by: Arin Ghazarian <aringhazarian@github.com>
Customers have asked if it's possible to add an option to let them set a state other than private for a repo when it's done migrating. This capability is already implemented in Octoshift, so this issue tracks passing the appropriate data to Octoshift via the CLI to use this feature.
The customer can configure this in the CLI. When they run generate script we will add a
--target-repo-visibility
option to migrate repo that by default matches the state that the source repo was in.Todo
--target-repo-visibility
to themigrate-repo
command that adds the state that the source repo was in (i.e. private/public/internal). If the field isn't included then the default should be private.--target-repo-visibility
should be included in for ado2gh customers. We can just default to private for that scenario.The text was updated successfully, but these errors were encountered: