Skip to content

ci: add reusable contributor trust action#91

Open
Neroxsh wants to merge 4 commits into
Open-Source-Bazaar:mainfrom
Neroxsh:feat/contributor-trust-gate
Open

ci: add reusable contributor trust action#91
Neroxsh wants to merge 4 commits into
Open-Source-Bazaar:mainfrom
Neroxsh:feat/contributor-trust-gate

Conversation

@Neroxsh

@Neroxsh Neroxsh commented Jul 13, 2026

Copy link
Copy Markdown

PR-91 PR-91 PR-91 Powered by Pull Request Badge

变更说明

按审查意见重构为独立、可复用的 GitHub Action:

  • 核心实现已发布到 Neroxsh/contributor-trust-action@v1
  • 本仓库只新增一份 38 行的调用工作流,不再修改 PR 模板、奖励 Issue 表单或原有悬赏流程。
  • 支持检查新 PR、新 Issue 和 Issue 评论作者,读取公开账号资料、账号年龄、近期公开活动、历史 Issue/PR 及在本组织的既往 PR。
  • 可选使用 GitHub Models 做有证据约束的二次判断;Models 不可用时仍输出规则报告。
  • 中高风险仅添加 needs-contributor-review 并更新幂等报告评论,不自动封禁账号;最终决定保留给维护者。
  • pull_request_target 不检出、更不执行外部 PR 代码。
  • 独立 Action 无第三方运行时依赖,便于其他仓库直接复用。

Closes #89

验证方式

  • 独立 Action:node --test,5 项测试全部通过。
  • node --check dist/index.mjsnode --check src/analyze.mjs:通过。
  • 使用真实 GitHub API 对 PR 事件执行只读冒烟测试:通过。
  • 独立仓库 mainv1 的 GitHub Actions 测试均通过。
  • 本 PR 相对 main 仅新增 .github/workflows/contributor-trust.yml

AI 使用说明

本次使用 Codex 辅助调研、实现和测试;已复核 API 权限、外部 PR 安全边界、标签/评论幂等逻辑及风险阈值,并对提交结果负责。

@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (1)
  • .github/workflows/contributor-trust.yml is excluded by none and included by none

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 5872937f-015f-444c-90a0-8ec4c257440e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Neroxsh Neroxsh mentioned this pull request Jul 13, 2026

@TechQuery TechQuery left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. 我不认可对原有工作流这么大的改动:#89 (comment)
  2. 建议先做成一个独立的 GitHub action,然后在本仓库引用,也方便在更多仓库复用,参考:https://github.com/freeCodeCamp-China/article-webpage-to-markdown-action

@Neroxsh

Neroxsh commented Jul 15, 2026

Copy link
Copy Markdown
Author

@TechQuery 已按审查意见完成重构:核心实现拆到独立 Action https://github.com/Neroxsh/contributor-trust-action ,并发布 v1;本 PR 现在只新增调用工作流,不再改动模板或原有悬赏流程。Action 会检查公开账号资料、活动轨迹和历史投稿,可选用 GitHub Models 二次分析,但只输出报告并标记人工复核,不自动封禁。独立仓库 main/v1 CI 均已通过,烦请重新审查。

@TechQuery

Copy link
Copy Markdown
Member

PR-91 PR-91 PR-91 Powered by Pull Request Badge

????

??????????????? GitHub Action?

  • ???????? Neroxsh/contributor-trust-action@v1?
    https://github.com/Neroxsh/contributor-trust-action
  • ???????? 38 ??????????? PR ????? Issue ??????????
  • ????? PR?? Issue ? Issue ???????????????????????????? Issue/PR ???????? PR?
  • ???? GitHub Models ????????????Models ????????????
  • ??????? needs-contributor-review ?????????????????????????????
  • pull_request_target ?????????? PR ???
  • ?? Action ?????????????????????

Closes #89

????

  • ?? Action?node --test?5 ????????
  • node --check dist/index.mjs ? node --check src/analyze.mjs????
  • ???? GitHub API ? PR ??????????????
  • ???? main ? v1 ? GitHub Actions ??????
  • ? PR ?? main ??? .github/workflows/contributor-trust.yml?

AI ??????? Codex ?????????? API ????? PR ???????/????????????????????

为什么楼主的正文都变成了乱码?@Neroxsh 你是机器人吗?

@Neroxsh

Neroxsh commented Jul 16, 2026

Copy link
Copy Markdown
Author

不是 GitHub Bot 账号,账号由真人持有;本次贡献明确使用了 Codex 辅助,并已在 PR 中披露。

上次乱码是我通过 Windows PowerShell 管道更新 PR 正文时的 UTF-8 编码问题,不是源文本本身。现已改用 UTF-8 文件重新提交正文,并通过 GitHub API 复核中文显示正常。抱歉给审查带来困扰。

@Neroxsh Neroxsh changed the title ci: add verifiable contributor trust gate ci: add reusable contributor trust action Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Reward] Bot Killer

2 participants