如何使用查询字符串参数在 GitHub 上实现新文件模板?

How to Achieve New File Template on GitHub Using Query String Args?

如果我将这个 link 提供给某人,它会把他们带到一个页面以在 GitHub 上创建这个文件(它可能会要求他们先登录并 fork):

https://github.com/torvalds/linux/new/master/README2

我想像这样预填新文件的标题和内容:

https://github.com/torvalds/linux/new/master/README2?title=ThisIsANewFile&Contents=HereIsSomeContent

但是好像不支持。我POST到这个URL预填会更好。

有办法实现吗?如果可能的话,我试图避免 API 。

预填充仅适用于文件名,不适用于文件本身的内容或任何其他元数据,如提交消息、提交描述。我认为此功能的最后可用更新仍然是:https://github.blog/2012-12-05-creating-files-on-github/

希望对您有所帮助。