为 Microsoft Graph 培训存储库做贡献Contributing to Microsoft Graph training repositories

感谢你为此项目做贡献!Thank you for contributing to this project! 在提交拉取请求之前,请务必考虑以下事项。Before submitting your pull request, be sure to consider the following.

概述Overview

此存储库中的代码有三个用途:The code in this repository serves three purposes:

  • 教程文件夹中的 Markdown 文件在 Microsoft Graph 教程页上作为教程发布。The Markdown files in the tutorial folder are published as a tutorial on the Microsoft Graph tutorials page.
  • 演示 文件夹中的示例项目 是 Microsoft Graph 快速入门 的源*The sample project in the demo folder is the source for a Microsoft Graph quick start.*
  • 演示文件夹中的示例项目也可直接从 GitHub 下载,并且应在一些简单配置后即点运行。The sample project in the demo folder is also downloadable directly from GitHub and should run as-is after some simple configuration.

* 并非所有培训存储库都作为快速入门 (可用) 。* Not all training repositories are available as quick starts (yet).

请记住这一点很重要,因为一个地方的更改可能需要在另一处进行更改,以保持内容同步。只要有可能,Markdown 文件都将使用自定义语法 () 直接引用源代码文件,以便更新源中的代码将自动更新 :::code Markdown 中的代码。This is important to keep in mind, because changes in one place may require changes in another, to keep things in sync. Whereever possible, the Markdown files refer to the source code files directly (using a custom :::code syntax), so that updating code in source will automatically update the code in Markdown.

更新代码Updating code

Markdown :::code 中使用的语法取决于源代码文件中的特定注释。The :::code syntax used in Markdown depends on specific comments in the source code file. 这些注释如下所示:These comments look like the following:

// <MySnippet>
Console.WriteLine("Hello World!");
// </MySnippet>

如果更新这些"标记"注释之间的代码,Markdown 文件将在发布到 Microsoft Graph 文档网站时自动获取这些更改。If you update code between these "marker" comments, the Markdown files will automatically get those changes when published to the Microsoft Graph documentation site. 如果在这些注释之外更新代码,则很可能需要更新相应的 Markdown。If you update code outside of those comments, it's very likely that you'll need to update the corresponding Markdown.

添加功能Adding features

尽管积极性很高,但请不要发送拉取请求以向示例添加新功能。While the enthusiasm is appreciated, please don't send pull requests to add new features to the sample. 由于此存储库主要是"生成第一个应用"教程,因此功能集受设计限制。Because this repository is primarily a "build your first app" tutorial, the feature set is limited, by design.

提交拉取请求Submitting pull requests

请将所有拉取请求提交到 master 分支。Please submit all pull requests to the master branch.

何时发布更改?When do changes get published?

Microsoft Graph 教程网站 发布更新不是自动的。Publishing of updates to the Microsoft Graph tutorials site is not automatic. 必须先将更改提升为分支,然后网站管理员必须 live 触发生成。Changes must first be promoted to the live branch, then a build must be triggered by the site admins. 这通常基于"需要"完成。This is typically done on an "as-needed" basis.

行为准则Code of conduct

此项目采用 Microsoft 开源行为准则。有关详细信息,请参阅 Code of Conduct FAQ(行为准则常见问题解答),有任何其他问题或意见,也可联系 opencode@microsoft.comThis project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.