Skip to content

chore: add anti-spam guard for star-farming issues - #299

Closed
liukewia wants to merge 1 commit into
TencentCloud:mainfrom
liukewia:chore/build-anti-spam-issues-workflow
Closed

chore: add anti-spam guard for star-farming issues#299
liukewia wants to merge 1 commit into
TencentCloud:mainfrom
liukewia:chore/build-anti-spam-issues-workflow

Conversation

@liukewia

Copy link
Copy Markdown
Contributor

Summary

Adds an automated Anti-spam Issue Guard GitHub Actions workflow (.github/workflows/anti-spam-issues.yml) to automatically flag, comment on, and close suspicious issues—specifically targeting coordinated star-farming accusations and bot spam originating from new accounts with no prior repository activity.

Key Capabilities

  • Trigger Support: Automatically runs on new issue creation (issues: opened) or via manual trigger (workflow_dispatch) with an issue number input.
  • Trust & Whitelisting Rules: Bypasses repository collaborators, owners, contributors, members, bot accounts, and users with prior issue or PR activity in the repository.
  • Account Age Threshold: Checks if the author's account age is within the configured threshold (default: 180 days).
  • Pattern Matching: Detects combinations of star-farming keywords, abnormal growth claims, bot account patterns, report threats, metric mismatches, and reputation attack phrases.
  • Automated Triage: Labels flagged issues with pending-maintainer-review, posts a friendly bilingual (English/Chinese) explanation asking genuine users to comment, and automatically closes the issue as not_planned.

Target branch

  • Base is develop (feature / fix — default)
  • Base is main (release/* or hotfix/* only)

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Refactor / chore
  • Release / hotfix

Test plan

  • Triggered manually via workflow_dispatch on test issue numbers (#19 format and raw integer format).
  • Verified user bypass logic against trusted members and accounts with previous activity.
  • Tested Regex pattern hits against sample spam text matching star-farming templates.
  • Verified successful labeling, commenting, and issue closing behavior via Octokit REST API.
  • make all passes locally
  • Added/updated tests

Checklist

  • Updated CHANGELOG.md (if user-facing)
  • README / docs updated (if needed)

@liukewia liukewia changed the title chore: anti spam bot chore: add anti-spam guard for star-farming issues Aug 14, 2026
@liukewia liukewia closed this Aug 14, 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.

1 participant