bbs2gh: support setting custom property values after repository migration

未关闭
#1,628 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

@enyil 已经在做这个了。

开始于 2026年10月8日。

  • #1629 来自 @enyil —— 未关闭

评估

难度
3/5
预计耗时
1-2 天
新手友好度
25/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
停滞
技术栈
csharp, github
领域
cli

调研方向

The work is in the bbs2gh migrate-repo command, where the proposed --custom-properties flag would be validated and then applied via PATCH /repos/{owner}/{repo}/properties/values after a successful migration. Linked PR #1629 already holds an implementation, so review that first rather than starting fresh. Done means the flag is validated up front, rejected with --queue-only and export-only modes, and reports property-update failures without suggesting a rerun.

由索引模型根据 Issue 内容生成。

描述

Description

I'd like to add an optional --custom-properties flag to gh bbs2gh migrate-repo so users can apply custom property key/value pairs to the destination repository as part of the migration command, rather than running a separate update manually.

Example:

--custom-properties '{"environment":"production","teams":["platform","security"]}'

The proposed scope is bbs2gh only. This does not add the option to ado2gh, gei, or gl2gh.

Proposed behavior
  • Accept an inline JSON object with strings, arrays of strings (multi-select), and null (unset). Boolean properties use the strings "true" and "false".
  • Validate the JSON and incompatible options before starting migration work.
  • After the repository migration succeeds, apply the values using PATCH /repos/{owner}/{repo}/properties/values.
  • Require the properties to already be defined in the destination organization and the caller to have permission to edit their values.
  • Reject --queue-only and export-only operations, since no post-migration update can be guaranteed in those modes.
  • Report property-update failures explicitly while explaining that the migrated repository already exists and the migration should not be rerun.
  • Leave existing behavior unchanged when the flag is omitted. generate-script is not extended; users can add the flag to individual generated migrate-repo calls.
Important limitation and related issues

The currently exposed StartRepositoryMigrationInput GraphQL input does not have a custom-properties field, so this proposal applies values after a successful migration, not atomically at repository creation.

It therefore does not solve creation-time required-property policies or the scenarios in github/gh-gei#1558 and github/gh-gei#1563. Those need migration API support and are separate from this bbs2gh-only convenience feature.

An implementation is prepared on enyil/gh-gei:enyil-bbs2gh-custom-properties with regression coverage, README documentation, logging, and a release note. Opening this issue for maintainer feedback before submitting a PR, as requested by CONTRIBUTING.md.

主要语言
C#
星标
482
派生
151
平均合并
2 天 18 小时
30 天内合并 PR
5

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

github/gh-gei 的其他 Issue

查看 github/gh-gei 的全部 Issue

相似的 Issue

更多 C# Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。