Skip to content

Commit bf4136d

Browse files
jwesleyeclaude
andcommitted
feat: add community health files and enhanced automation workflows
- Add SECURITY.md with vulnerability reporting guidelines - Add stale issue bot to manage inactive issues/PRs - Add first-time contributor greeting workflow - Add auto-labeling for PRs based on file changes and size - Add release drafter for automated release notes - Configure repository with description, topics, discussions - Add enhanced labels (priority, status, type, size, area) Improves project maintainability and contributor experience. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 89bbff8 commit bf4136d

7 files changed

Lines changed: 463 additions & 0 deletions

File tree

.github/labeler.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Auto-labeling rules for PRs based on changed files
2+
# https://github.com/actions/labeler
3+
4+
# Documentation changes
5+
"area: documentation":
6+
- changed-files:
7+
- any-glob-to-any-file:
8+
- "**/*.md"
9+
- "docs/**/*"
10+
11+
# Tests
12+
"area: tests":
13+
- changed-files:
14+
- any-glob-to-any-file:
15+
- "tests/**/*"
16+
- "**/test_*.py"
17+
- "**/*_test.py"
18+
19+
# CI/CD and workflows
20+
"area: ci":
21+
- changed-files:
22+
- any-glob-to-any-file:
23+
- ".github/**/*"
24+
- ".gitignore"
25+
- ".pre-commit-config.yaml"
26+
27+
# Dependencies
28+
"type: dependencies":
29+
- changed-files:
30+
- any-glob-to-any-file:
31+
- "pyproject.toml"
32+
- "requirements*.txt"
33+
- "poetry.lock"
34+
- "Pipfile.lock"
35+
36+
# Core functionality
37+
"area: core":
38+
- changed-files:
39+
- any-glob-to-any-file:
40+
- "src/basic_agent_chat_loop/components/**/*"
41+
- "src/basic_agent_chat_loop/chat_loop.py"
42+
- "src/basic_agent_chat_loop/main.py"
43+
44+
# Configuration
45+
"area: config":
46+
- changed-files:
47+
- any-glob-to-any-file:
48+
- "src/basic_agent_chat_loop/chat_config.py"
49+
- "**/.chatrc"
50+
- "**/config*.py"
51+
52+
# Templates and examples
53+
"area: templates":
54+
- changed-files:
55+
- any-glob-to-any-file:
56+
- "examples/**/*"
57+
- "templates/**/*"

.github/release-drafter.yml

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# Release Drafter configuration
2+
# https://github.com/release-drafter/release-drafter
3+
4+
name-template: "v$RESOLVED_VERSION"
5+
tag-template: "v$RESOLVED_VERSION"
6+
7+
categories:
8+
- title: "🚀 Features"
9+
labels:
10+
- "type: enhancement"
11+
- "type: feature"
12+
- title: "🐛 Bug Fixes"
13+
labels:
14+
- "type: bug"
15+
- title: "🔒 Security"
16+
labels:
17+
- "type: security"
18+
- title: "⚠️ Breaking Changes"
19+
labels:
20+
- "type: breaking-change"
21+
- title: "📚 Documentation"
22+
labels:
23+
- "area: documentation"
24+
- title: "🧪 Tests"
25+
labels:
26+
- "area: tests"
27+
- title: "🔧 Maintenance"
28+
labels:
29+
- "area: ci"
30+
- "type: dependencies"
31+
- title: "🎨 Style & Refactoring"
32+
labels:
33+
- "type: refactor"
34+
- "type: style"
35+
36+
change-template: "- $TITLE (#$NUMBER) @$AUTHOR"
37+
change-title-escapes: '\<*_&'
38+
39+
version-resolver:
40+
major:
41+
labels:
42+
- "type: breaking-change"
43+
- "version: major"
44+
minor:
45+
labels:
46+
- "type: enhancement"
47+
- "type: feature"
48+
- "version: minor"
49+
patch:
50+
labels:
51+
- "type: bug"
52+
- "type: security"
53+
- "type: dependencies"
54+
- "version: patch"
55+
default: patch
56+
57+
template: |
58+
## What's Changed
59+
60+
$CHANGES
61+
62+
## Contributors
63+
64+
Thank you to all contributors who made this release possible!
65+
66+
$CONTRIBUTORS
67+
68+
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION
69+
70+
autolabeler:
71+
- label: "area: documentation"
72+
files:
73+
- "*.md"
74+
- "docs/**/*"
75+
- label: "area: tests"
76+
files:
77+
- "tests/**/*"
78+
- "**/test_*.py"
79+
- label: "area: ci"
80+
files:
81+
- ".github/**/*"
82+
- label: "type: dependencies"
83+
files:
84+
- "pyproject.toml"
85+
- "requirements*.txt"
86+
- label: "area: core"
87+
files:
88+
- "src/basic_agent_chat_loop/**/*.py"
89+
90+
exclude-labels:
91+
- "skip-changelog"
92+
- "status: duplicate"
93+
- "status: invalid"
94+
- "status: wontfix"
95+
96+
replacers:
97+
# Replace "Fix #123" with a link
98+
- search: '/\bFix #(\d+)\b/g'
99+
replace: "Fix [#$1](https://github.com/$OWNER/$REPOSITORY/issues/$1)"
100+
# Replace "Close #123" with a link
101+
- search: '/\bClose #(\d+)\b/g'
102+
replace: "Close [#$1](https://github.com/$OWNER/$REPOSITORY/issues/$1)"
103+
# Replace "Resolve #123" with a link
104+
- search: '/\bResolve #(\d+)\b/g'
105+
replace: "Resolve [#$1](https://github.com/$OWNER/$REPOSITORY/issues/$1)"

.github/workflows/greet.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Greet first-time contributors
2+
# https://github.com/actions/first-interaction
3+
name: "Greet First-Time Contributors"
4+
5+
on:
6+
issues:
7+
types: [opened]
8+
pull_request_target:
9+
types: [opened]
10+
11+
permissions:
12+
issues: write
13+
pull-requests: write
14+
15+
jobs:
16+
greeting:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Greet first-time contributor
20+
uses: actions/first-interaction@v1
21+
with:
22+
repo-token: ${{ secrets.GITHUB_TOKEN }}
23+
24+
# Message for first issue
25+
issue-message: |
26+
👋 Welcome to **Basic Agent Chat Loop**!
27+
28+
Thank you for opening your first issue! We appreciate you taking the time to contribute to the project.
29+
30+
A maintainer will review your issue soon. In the meantime:
31+
- Make sure you've provided all the details requested in the issue template
32+
- Check if there are any related discussions or issues
33+
- Feel free to ask questions in [GitHub Discussions](https://github.com/weshicks/Basic-Agent-Chat-Loop/discussions)
34+
35+
We're excited to have you as part of our community! 🎉
36+
37+
# Message for first PR
38+
pr-message: |
39+
🎉 Thank you for your first pull request to **Basic Agent Chat Loop**!
40+
41+
We're thrilled to see your contribution. Here's what happens next:
42+
- Our CI will run tests on your changes
43+
- A maintainer will review your PR as soon as possible
44+
- We may suggest some changes or improvements
45+
- Once approved, we'll merge your changes
46+
47+
While you wait:
48+
- Ensure all CI checks pass
49+
- Address any review comments
50+
- Check out our [CONTRIBUTING.md](CONTRIBUTING.md) for guidance
51+
52+
Thank you for helping make this project better! 🚀

.github/workflows/labeler.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Auto-label pull requests based on changed files and size
2+
# https://github.com/actions/labeler
3+
name: "Auto-Label PRs"
4+
5+
on:
6+
pull_request_target:
7+
types: [opened, synchronize, reopened]
8+
9+
permissions:
10+
contents: read
11+
pull-requests: write
12+
13+
jobs:
14+
label:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Label based on changed files
21+
uses: actions/labeler@v5
22+
with:
23+
repo-token: ${{ secrets.GITHUB_TOKEN }}
24+
configuration-path: .github/labeler.yml
25+
26+
- name: Label PR size
27+
uses: codelytv/pr-size-labeler@v1
28+
with:
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
xs_label: "size: XS"
31+
xs_max_size: 10
32+
s_label: "size: S"
33+
s_max_size: 100
34+
m_label: "size: M"
35+
m_max_size: 500
36+
l_label: "size: L"
37+
l_max_size: 1000
38+
xl_label: "size: XL"
39+
message_if_xl: |
40+
This PR is quite large! Consider:
41+
- Breaking it into smaller PRs
42+
- Explaining the scope in the description
43+
- Ensuring adequate test coverage
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Auto-generate release notes draft
2+
# https://github.com/release-drafter/release-drafter
3+
name: "Release Drafter"
4+
5+
on:
6+
push:
7+
branches:
8+
- main
9+
pull_request:
10+
types: [opened, reopened, synchronize]
11+
workflow_dispatch:
12+
13+
permissions:
14+
contents: write
15+
pull-requests: write
16+
17+
jobs:
18+
update_release_draft:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Draft release
22+
uses: release-drafter/release-drafter@v6
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
with:
26+
config-name: release-drafter.yml

.github/workflows/stale.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# Close stale issues and PRs
2+
# https://github.com/actions/stale
3+
name: "Close Stale Issues and PRs"
4+
5+
on:
6+
schedule:
7+
# Run daily at 00:00 UTC
8+
- cron: "0 0 * * *"
9+
workflow_dispatch: # Allow manual triggering
10+
11+
permissions:
12+
issues: write
13+
pull-requests: write
14+
15+
jobs:
16+
stale:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Check for stale issues and PRs
20+
uses: actions/stale@v9
21+
with:
22+
# Stale issues
23+
days-before-issue-stale: 60
24+
days-before-issue-close: 14
25+
stale-issue-label: "status: stale"
26+
stale-issue-message: |
27+
This issue has been automatically marked as stale because it has not had recent activity.
28+
It will be closed in 14 days if no further activity occurs.
29+
30+
If this issue is still relevant, please:
31+
- Comment to keep it open
32+
- Remove the "status: stale" label
33+
- Provide additional information or updates
34+
35+
Thank you for your contributions!
36+
close-issue-message: |
37+
This issue has been automatically closed due to inactivity.
38+
39+
If you believe this issue is still relevant:
40+
- Feel free to reopen it with additional context
41+
- Create a new issue referencing this one
42+
43+
Thank you for understanding!
44+
45+
# Stale PRs
46+
days-before-pr-stale: 30
47+
days-before-pr-close: 14
48+
stale-pr-label: "status: stale"
49+
stale-pr-message: |
50+
This pull request has been automatically marked as stale because it has not had recent activity.
51+
It will be closed in 14 days if no further activity occurs.
52+
53+
If you plan to continue working on this PR:
54+
- Push new commits or rebase on the latest main
55+
- Comment to indicate you're still working on it
56+
- Remove the "status: stale" label
57+
58+
Thank you for your contribution!
59+
close-pr-message: |
60+
This pull request has been automatically closed due to inactivity.
61+
62+
If you'd like to continue this work:
63+
- Feel free to reopen this PR if it's still relevant
64+
- Create a new PR if the changes need to be rebased
65+
66+
Thank you for your contribution!
67+
68+
# Exemptions
69+
exempt-issue-labels: "priority: high,status: in-progress,status: blocked"
70+
exempt-pr-labels: "priority: high,status: in-progress,status: blocked"
71+
72+
# Operations per run (to avoid rate limiting)
73+
operations-per-run: 100
74+
75+
# Don't close issues/PRs with recent updates
76+
exempt-milestones: true
77+
exempt-all-milestones: false

0 commit comments

Comments
 (0)