Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save shikendon/2f6c3d48bba357bd094ca87ca5817802 to your computer and use it in GitHub Desktop.

Select an option

Save shikendon/2f6c3d48bba357bd094ca87ca5817802 to your computer and use it in GitHub Desktop.
From 508cb4310f1b84d2d32a16ded4a21af775917a2b Mon Sep 17 00:00:00 2001
From: Shi-Ken Don <[email protected]>
Date: Sun, 16 Nov 2025 01:56:31 +0800
Subject: [PATCH] docs: add CONTRIBUTING.md syncing strategy
---
.github/workflows/sync-contributing.yml | 27 ++++++++++++++
CONTRIBUTING.md | 47 +++++++++++++++++++++++++
2 files changed, 74 insertions(+)
create mode 100644 .github/workflows/sync-contributing.yml
create mode 100644 CONTRIBUTING.md
diff --git a/.github/workflows/sync-contributing.yml b/.github/workflows/sync-contributing.yml
new file mode 100644
index 0000000..afd967e
--- /dev/null
+++ b/.github/workflows/sync-contributing.yml
@@ -0,0 +1,27 @@
+name: Sync CONTRIBUTING.md
+
+on:
+ schedule:
+ - cron: "0 0 * * 1"
+ workflow_dispatch:
+
+jobs:
+ sync:
+ runs-on: ubuntu-latest
+ env:
+ GIST_USERNAME: shikendon
+ GIST_ID: 2f6c3d48bba357bd094ca87ca5817802
+ steps:
+ - uses: actions/checkout@v5
+
+ - name: Download latest CONTRIBUTING.md
+ run: |
+ curl -fsSL "https://gist.githubusercontent.com/${GIST_USERNAME}/${GIST_ID}/raw/CONTRIBUTING.md" \
+ -o CONTRIBUTING.md
+
+ - name: Create Pull Request
+ uses: peter-evans/create-pull-request@v7
+ with:
+ commit-message: "chore: sync CONTRIBUTING.md from gist"
+ title: "Update CONTRIBUTING.md"
+ branch: sync-contributing
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 0000000..17d8239
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,47 @@
+# Contributing Guidelines
+
+## Code Standards
+
+### Language & Documentation
+- **Code comments**: English preferred, but follow existing context
+- **Documentation**: English preferred
+- **Principle**: Self-documenting code over redundant comments
+
+### Style Enforcement
+- **Ruby**: Follow Rubocop conventions (`.rubocop.yml`)
+- **JavaScript**: Follow ESLint conventions (`.eslintrc`)
+- **Python**: Follow PEP 8 conventions
+- **Go**: Follow gofmt conventions
+- **Java**: Follow [Google Java Style Guide](https://google.github.io/styleguide/javaguide.html)
+
+### Commit Messages
+- Follow [Conventional Commits](https://www.conventionalcommits.org/) specification
+
+## Workflow
+
+1. Run linters before committing:
+```bash
+# Ruby
+rubocop -A
+
+# JavaScript
+eslint --fix .
+
+# Python
+black . && isort .
+
+# Go
+gofmt -w .
+
+# Java
+# Use google-java-format plugin in your IDE or:
+# java -jar google-java-format.jar --replace src/**/*.java
+```
+
+2. Ensure all tests pass
+3. Write clear, self-documenting code
+4. Commit with conventional format: `type(scope): description`
+
+---
+
+<!-- For Claude Code: Strictly follow all standards above. Verify linter compliance before marking tasks complete. -->
--
2.50.0

Contributing Guidelines

Code Standards

Language & Documentation

  • Code comments: English preferred, but follow existing context
  • Documentation: English preferred
  • Principle: Self-documenting code over redundant comments

Style Enforcement

  • Ruby: Follow Rubocop conventions (.rubocop.yml)
  • JavaScript: Follow ESLint conventions (.eslintrc)
  • Python: Follow PEP 8 conventions
  • Go: Follow gofmt conventions
  • Java: Follow Google Java Style Guide

Commit Messages

Workflow

  1. Run linters before committing:
# Ruby
rubocop -A

# JavaScript
eslint --fix .

# Python
black . && isort .

# Go
gofmt -w .

# Java
# Use google-java-format plugin in your IDE or:
# java -jar google-java-format.jar --replace src/**/*.java
  1. Ensure all tests pass
  2. Write clear, self-documenting code
  3. Commit with conventional format: type(scope): description

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment