@@ -102,16 +102,20 @@ metrics** so maintainers can make informed decisions. It's the difference betwee
102102
103103### Metrics
104104
105- | Metric | Description | Default Threshold |
106- | -------------------- | ---------------------------------------------- | ----------------- |
107- | PR Merge Rate | Percentage of PRs that get merged vs closed | >= 0% |
108- | Account Age | Age of the GitHub account | >= 0 days |
109- | Positive Reactions | Positive reactions received on comments/issues | >= 0 |
110- | Negative Reactions | Negative reactions received (maximum allowed) | <= 0 |
111- | Repo Quality | Contributions to repos with stars | >= 0 |
112- | Activity Consistency | Regular activity over time | >= 0% |
113- | Issue Engagement | Issues created that receive engagement | >= 0 |
114- | Code Reviews | Code reviews given to others | >= 0 |
105+ | Metric | Description | Default Threshold |
106+ | -------------------- | ----------------------------------------------- | ----------------- |
107+ | PR Merge Rate | Percentage of PRs that get merged vs closed | >= 0% |
108+ | Account Age | Age of the GitHub account | >= 0 days |
109+ | Positive Reactions | Positive reactions received on comments/issues | >= 0 |
110+ | Negative Reactions | Negative reactions received (maximum allowed) | <= 0 |
111+ | Repo Quality | Contributions to repos with stars | >= 0 |
112+ | Activity Consistency | Regular activity over time | >= 0% |
113+ | Issue Engagement | Issues created that receive engagement | >= 0 |
114+ | Code Reviews | Code reviews given to others | >= 0 |
115+ | Merger Diversity | Unique maintainers who merged contributor's PRs | >= 0 |
116+ | Repo History | Track record in the specific repository | >= 0 |
117+ | Profile Completeness | GitHub profile richness (bio, followers, etc.) | >= 0 |
118+ | Suspicious Patterns | Detection of spam-like activity patterns | N/A (auto) |
115119
116120## Metric Details
117121
@@ -244,6 +248,70 @@ Reviewers who help others improve their code are valuable contributors. Spam acc
244248- Look for opportunities to help other contributors
245249- Share your knowledge and expertise
246250
251+ ### Merger Diversity
252+
253+ ** What it measures:** The number of unique maintainers who have merged the contributor's pull requests.
254+
255+ ** Why it matters:** Having PRs merged by different maintainers across various projects demonstrates trust from the
256+ community. Contributors who only self-merge their own PRs on their own repositories haven't demonstrated external trust.
257+
258+ ** How it's calculated:** Count of unique GitHub users who merged the contributor's PRs. Self-merges on own repositories
259+ are tracked separately.
260+
261+ ** How to improve:**
262+
263+ - Contribute to established projects where maintainers review and merge your work
264+ - Build relationships with project maintainers
265+ - Focus on quality contributions that get merged by others
266+
267+ ### Repo History
268+
269+ ** What it measures:** The contributor's track record in the specific repository receiving the PR.
270+
271+ ** Why it matters:** A history of successful contributions to a repository indicates familiarity with its codebase,
272+ contribution guidelines, and maintainer expectations.
273+
274+ ** How it's calculated:** Merge rate and PR count specifically for the target repository.
275+
276+ ** How to improve:**
277+
278+ - Start with smaller contributions to build trust
279+ - Follow the project's contribution guidelines carefully
280+ - Respond to reviewer feedback promptly
281+
282+ ### Profile Completeness
283+
284+ ** What it measures:** How complete the contributor's GitHub profile is (bio, company, followers, public repos).
285+
286+ ** Why it matters:** A complete profile indicates a legitimate, invested GitHub user. Spam accounts typically have
287+ minimal or no profile information.
288+
289+ ** How it's calculated:** Score based on presence of bio (20 points), company (20 points), followers (up to 40 points),
290+ and public repositories (up to 20 points).
291+
292+ ** How to improve:**
293+
294+ - Add a bio describing yourself and your interests
295+ - Fill in your company or affiliation
296+ - Engage with the community to gain followers
297+ - Create and maintain public repositories
298+
299+ ### Suspicious Patterns
300+
301+ ** What it measures:** Detection of activity patterns commonly associated with spam accounts.
302+
303+ ** Why it matters:** Certain combinations of behaviors (new account + high PR volume + many repos) are strong indicators
304+ of automated spam.
305+
306+ ** Patterns detected:**
307+
308+ - ** SPAM_PATTERN:** New account (<30 days) with >25 PRs across >10 repositories
309+ - ** HIGH_PR_RATE:** More than 2 PRs per day on average
310+ - ** SELF_MERGE_ABUSE:** High rate of self-merges on low-quality repositories
311+ - ** REPO_SPAM:** Contributions to many repos with very low star counts
312+
313+ ** Note:** This metric cannot be configured with a threshold. Critical patterns cause automatic failure.
314+
247315## Usage
248316
249317> ** Note** : All metric thresholds default to ` 0 ` , making the action permissive by default. Configure stricter thresholds
@@ -287,6 +355,13 @@ jobs:
287355 threshold-account-age : ' 30' # Require 30+ day old accounts
288356 threshold-positive-reactions : ' 1' # Require at least 1 positive reaction
289357 threshold-negative-reactions : ' 5' # Allow max 5 negative reactions
358+ threshold-merger-diversity : ' 2' # Require 2+ unique maintainers who merged PRs
359+ threshold-repo-history-merge-rate : ' 0.3' # Require 30% merge rate in this repo
360+ threshold-repo-history-min-prs : ' 1' # Require at least 1 previous PR in repo
361+ threshold-profile-completeness : ' 20' # Require profile completeness score >= 20
362+
363+ # Spam detection (enabled by default)
364+ enable-spam-detection : ' true'
290365
291366 # Metrics that must pass (comma-separated)
292367 required-metrics : ' prMergeRate,accountAge'
@@ -321,24 +396,29 @@ jobs:
321396
322397## Inputs
323398
324- | Input | Required | Default | Description |
325- | ------------------------------ | -------- | ------------------------ | ---------------------------------- |
326- | ` github-token` | Yes | `${{ github.token }}` | GitHub token for API access |
327- | `thresholds` | No | `{}` | JSON object with custom thresholds |
328- | `threshold-pr-merge-rate` | No | `0` | Minimum PR merge rate (0-1) |
329- | `threshold-account-age` | No | `0` | Minimum account age in days |
330- | `threshold-positive-reactions` | No | `0` | Minimum positive reactions |
331- | `threshold-negative-reactions` | No | `0` | Maximum negative reactions |
332- | `required-metrics` | No | `prMergeRate,accountAge` | Metrics that must pass |
333- | `minimum-stars` | No | `100` | Min stars for quality repos |
334- | `analysis-window` | No | `12` | Months of history to analyze |
335- | `trusted-users` | No | Common bots | Comma-separated whitelist |
336- | `trusted-orgs` | No | - | Comma-separated org whitelist |
337- | `on-fail` | No | `comment` | Action when check fails |
338- | `label-name` | No | `needs-review` | Label to apply |
339- | `dry-run` | No | `false` | Log only, no actions |
340- | `new-account-action` | No | `neutral` | Handling for new accounts |
341- | `new-account-threshold-days` | No | `30` | Days to consider "new" |
399+ | Input | Required | Default | Description |
400+ | ----------------------------------- | -------- | ------------------------ | ------------------------------------- |
401+ | ` github-token` | Yes | `${{ github.token }}` | GitHub token for API access |
402+ | `thresholds` | No | `{}` | JSON object with custom thresholds |
403+ | `threshold-pr-merge-rate` | No | `0` | Minimum PR merge rate (0-1) |
404+ | `threshold-account-age` | No | `0` | Minimum account age in days |
405+ | `threshold-positive-reactions` | No | `0` | Minimum positive reactions |
406+ | `threshold-negative-reactions` | No | `0` | Maximum negative reactions |
407+ | `threshold-merger-diversity` | No | `0` | Minimum unique maintainers who merged |
408+ | `threshold-repo-history-merge-rate` | No | `0` | Minimum merge rate in this repo (0-1) |
409+ | `threshold-repo-history-min-prs` | No | `0` | Minimum previous PRs in this repo |
410+ | `threshold-profile-completeness` | No | `0` | Minimum profile completeness (0-100) |
411+ | `enable-spam-detection` | No | `true` | Enable suspicious pattern detection |
412+ | `required-metrics` | No | `prMergeRate,accountAge` | Metrics that must pass |
413+ | `minimum-stars` | No | `100` | Min stars for quality repos |
414+ | `analysis-window` | No | `12` | Months of history to analyze |
415+ | `trusted-users` | No | Common bots | Comma-separated whitelist |
416+ | `trusted-orgs` | No | - | Comma-separated org whitelist |
417+ | `on-fail` | No | `comment` | Action when check fails |
418+ | `label-name` | No | `needs-review` | Label to apply |
419+ | `dry-run` | No | `false` | Log only, no actions |
420+ | `new-account-action` | No | `neutral` | Handling for new accounts |
421+ | `new-account-threshold-days` | No | `30` | Days to consider "new" |
342422
343423# # Outputs
344424
0 commit comments