Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[Enhancement][CI] Add Branch Protection, Code Analysis and Project board

未关闭
#831 20 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
停滞
技术栈
csharp, github, github-actions
领域
ci-cd, devops, tooling

调研方向

首先检查现有的 GitHub Action“Build and test”以及 Settings → Code and Automation → Rules → Rulesets 区域。将所请求的分支保护、Code Scanning 和 nullability 检查、发布分支以及 GitHub Project board,与仓库约束和维护者的决定进行比较。完成的要求是确定一组经过同意且范围明确的仓库变更,而不是实施整个提案。

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

描述

improvement

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.

image image

2. Introducing a structured release branch strategy (for backporting)

It might also be helpful to introduce a dedicated release structure like:

  • release
  • release/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:

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 模板
  • 阅读贡献指南

从这里开始

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

MapsterMapper/Mapster 的其他 Issue

查看 MapsterMapper/Mapster 的全部 Issue

相似的 Issue

更多 C# Issue

把新 issue 发到你的邮箱

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