[Enhancement][CI] Add Branch Protection, Code Analysis and Project board
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 25/100
调研方向
首先检查现有的 GitHub Action“Build and test”以及 Settings → Code and Automation → Rules → Rulesets 区域。将所请求的分支保护、Code Scanning 和 nullability 检查、发布分支以及 GitHub Project board,与仓库约束和维护者的决定进行比较。完成的要求是确定一组经过同意且范围明确的仓库变更,而不是实施整个提案。
由索引模型根据 Issue 内容生成。
描述
Hello @DocSvartz, @stagep, @andrerav,
while reviewing this topic I noticed a few improvements that could help us avoid similar issues in the future. Since I don’t have access to Settings → Code and Automation → Rules → Rulesets, I can’t apply them myself, but I would like to propose the following for your consideration.
1. Branch protection for the default (master) branch
Given that we now have four people who can review pull requests, it would be beneficial to introduce a branch protection rule that:
- requires all changes to go through a pull request
- requires at least one approved reviewer before merging into master
This is a common pattern in OSS repositories to ensure code quality and prevent accidental direct commits.
2. Introducing a structured release branch strategy (for backporting)
It might also be helpful to introduce a dedicated release structure like:
releaserelease/stable/<version>
This is a common workflow in OSS projects and would allow clean backporting of fixes to already published versions, without forcing users to adopt breaking changes from ongoing development.
This could be valuable for Mapster in the long term, especially regarding stability and predictable package updates.
3. Strengthening CI feedback: code scanning, nullability analysis, and explicit method contracts
In the GitHub Action (“Build and test”), I noticed analyzer annotations such as “possible null reference exception”.
Since unexpected null behavior is undesirable in a published package, I would suggest enabling more comprehensive static analysis and code scanning.
Possible improvements:
- Enable GitHub Code Scanning (e.g., CodeQL) to detect nullability risks, unsafe patterns, and API-level issues
- Consider treating selected analyzer warnings as errors or failing CI on critical diagnostics
- Where applicable, use attributes such as
[NotNullIfNotNull],[NotNull],[MaybeNull], etc., to make method contracts explicitly null-aware.
This would allow us to catch potential nullability issues earlier, improve API clarity, and reduce the likelihood of runtime null-related failures for consumers of the package.
→ to implement CI for Code Scanning I would suggest to start with the template provided from GH and maybe someone of you could apply required setup steps that are Mapster specific as there is already a workflow for build & test ?
4. Introducing a GitHub Project for issue tracking and triage
To improve transparency and coordination around ongoing work, it may be beneficial to set up a GitHub Project Board
This would allow us to track, categorize, and triage issues and pull requests more efficiently, while providing a clear overview of priorities, progress, and open tasks.
A project board could help:
- visualize the current state of issues and PRs
- support maintainers in triage and planning
- make contributor workflows more predictable
References you could look into:
- Project board from the ASP.NET Core Docs Team: https://github.com/orgs/dotnet/projects/312
- Project board for my own Repos: https://github.com/users/DevTKSS/projects/1 (not as pretty as theirs ;) )
It's possible to set up Workflows e.g. along labels that are added so by this we could automate the (base) management for this to not have way more work then it helps us, but we would need to check and improve the available labels then 👍
@andrerav as GitHub preserves the branch protection rules for admin role, I think you will be the one to apply this, if this suggestion would be considerable
- 主要语言
- C#
- 星标
- 5.2k
- 派生
- 411
- 平均合并
- 1 天 8 小时
- 30 天内合并 PR
- 4
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
MapsterMapper/Mapster 的其他 Issue
-
.NET Matrix未关闭
难度 2/5 1-3 小时 新手友好度 72/100
MapsterMapper/Mapster#1003 ·
-
难度 3/5 1-2 天 新手友好度 58/100
MapsterMapper/Mapster#1024 · 1 条评论 ·
-
[Mapster Tool] Add support for global:: to disambiguate type names in generated mappers可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭improvement
难度 3/5 1-2 天 新手友好度 65/100
MapsterMapper/Mapster#1020 · 5 条评论 ·
-
Mapster.Tool - PropertySettingBuilder.Map(member, mapFunc, targetPropertyName) method is not working as expected!可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 3/5 1-2 天 新手友好度 68/100
MapsterMapper/Mapster#1017 · 6 条评论 ·
-
难度 3/5 1-2 天 新手友好度 57/100
MapsterMapper/Mapster#1007 · 5 条评论 ·
查看 MapsterMapper/Mapster 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 77/100
维护者通常 1 天内回复
-
:watch: Not Triaged advanced-concepts/subsvc dotnet-csharp/svc
难度 1/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
[bug] Season images use the season's TMDB id as a TVDB series id可能已有人在做 @ViKodex 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 85/100
-
enhancement no-stack-trace
难度 2/5 1-3 小时 新手友好度 66/100
greenshot/greenshot#1618 · 3 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 67/100
microsoft/aspire.dev#1962 ·
维护者通常 1 天内回复