Skip to content

Commit 3100f27

Browse files
billyjbryantclaude
andcommitted
feat: add CODEOWNERS file and improve PR validation workflow
- Add CODEOWNERS file for repository governance - Reorder workflow steps: auto-labeling runs before validation to prevent race conditions - Add comprehensive labeling logic: automatically adds "type: comprehensive" and suggests "release: minor" when 3+ areas/types are affected - Simplify labeler configuration to reduce complexity and prevent excessive labels - Add new "type: comprehensive" and "area: core" labels to label definitions - Re-fetch PR labels after auto-labeling to ensure validation sees updated labels 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 404eb1b commit 3100f27

6 files changed

Lines changed: 93 additions & 518 deletions

File tree

.github/labeler.yml

Lines changed: 12 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,48 @@
1-
# Auto-labeling configuration based on file changes
1+
# Auto-labeling configuration - simplified to reduce complexity
22

3-
# Area labels
4-
'area: bridge':
3+
# Core area labels (consolidated)
4+
'area: core':
55
- changed-files:
6-
- any-glob-to-any-file: 'src/mcp_foxxy_bridge/bridge_server.py'
7-
- changed-files:
8-
- any-glob-to-any-file: 'src/mcp_foxxy_bridge/proxy_server.py'
9-
- changed-files:
10-
- any-glob-to-any-file: 'src/mcp_foxxy_bridge/server_manager.py'
11-
12-
'area: server':
13-
- changed-files:
14-
- any-glob-to-any-file: 'src/mcp_foxxy_bridge/mcp_server.py'
15-
- changed-files:
16-
- any-glob-to-any-file: 'src/mcp_foxxy_bridge/sse_client.py'
17-
- changed-files:
18-
- any-glob-to-any-file: 'src/mcp_foxxy_bridge/streamablehttp_client.py'
6+
- any-glob-to-any-file: ['src/mcp_foxxy_bridge/**/*.py']
197

208
'area: config':
219
- changed-files:
22-
- any-glob-to-any-file: ['src/mcp_foxxy_bridge/config_loader.py', 'docs/examples/**/*', 'config.json', '**/*config*.json']
10+
- any-glob-to-any-file: ['src/mcp_foxxy_bridge/config_loader.py', '**/*config*.json']
2311

2412
'area: docker':
2513
- changed-files:
2614
- any-glob-to-any-file: ['Dockerfile', 'docker-compose.yml', '.dockerignore']
2715

2816
'area: docs':
2917
- changed-files:
30-
- any-glob-to-any-file: ['docs/**/*', 'README.md', 'CONTRIBUTING.md', 'CHANGELOG.md']
18+
- any-glob-to-any-file: ['docs/**/*', '**/*.md']
3119

3220
'area: tests':
3321
- changed-files:
3422
- any-glob-to-any-file: ['tests/**/*', 'test_*.py', '*_test.py']
3523

3624
'area: ci/cd':
3725
- changed-files:
38-
- any-glob-to-any-file: ['.github/workflows/**/*', '.github/labels.yml', '.github/labeler.yml', '.releaserc.json', 'codecov.yml']
26+
- any-glob-to-any-file: ['.github/**/*', '.releaserc.json', 'codecov.yml']
3927

40-
# Type labels based on file patterns
28+
# Type labels (simplified)
4129
'type: documentation':
4230
- changed-files:
43-
- any-glob-to-any-file: ['docs/**/*', 'README.md', 'CONTRIBUTING.md', '**/*.md']
31+
- any-glob-to-any-file: ['docs/**/*', '**/*.md']
4432

4533
'type: test':
4634
- changed-files:
4735
- any-glob-to-any-file: ['tests/**/*', 'test_*.py', '*_test.py']
4836

49-
'type: ci':
50-
- changed-files:
51-
- any-glob-to-any-file: ['.github/workflows/**/*', '.github/labels.yml', '.github/labeler.yml']
52-
5337
'type: build':
5438
- changed-files:
55-
- any-glob-to-any-file: ['pyproject.toml', 'Dockerfile', 'docker-compose.yml', '.releaserc.json', 'uv.lock', 'poetry.lock']
39+
- any-glob-to-any-file: ['pyproject.toml', 'Dockerfile', '*.lock']
5640

5741
'type: chore':
5842
- changed-files:
59-
- any-glob-to-any-file: ['.gitignore', '.gitmessage', 'VERSION', '.env*']
43+
- any-glob-to-any-file: ['.gitignore', 'VERSION', '.env*']
6044

6145
# Dependencies
6246
'dependencies':
6347
- changed-files:
64-
- any-glob-to-any-file: ['pyproject.toml', 'uv.lock', 'poetry.lock', 'package.json', 'package-lock.json']
48+
- any-glob-to-any-file: ['pyproject.toml', '*.lock', 'package.json']

.github/labels.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@
5656
color: "f9d0c4"
5757
description: "Build system or external dependencies"
5858

59+
- name: "type: comprehensive"
60+
color: "8b4513"
61+
description: "Comprehensive changes affecting multiple areas/types"
62+
5963
# Priority Labels
6064
- name: "priority: critical"
6165
color: "b60205"
@@ -99,6 +103,10 @@
99103
description: "On hold pending decision or external factor"
100104

101105
# Area Labels
106+
- name: "area: core"
107+
color: "c2e0c6"
108+
description: "Core application functionality"
109+
102110
- name: "area: bridge"
103111
color: "c2e0c6"
104112
description: "Bridge core functionality"

.github/workflows/main.yml

Lines changed: 48 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,59 @@ jobs:
3131
with:
3232
fetch-depth: 0
3333

34+
- name: Auto-label PR based on files
35+
uses: actions/labeler@v5
36+
with:
37+
repo-token: "${{ secrets.GITHUB_TOKEN }}"
38+
configuration-path: .github/labeler.yml
39+
40+
- name: Add comprehensive labeling
41+
uses: actions/github-script@v7
42+
with:
43+
script: |
44+
const pr = context.payload.pull_request;
45+
const currentLabels = pr.labels.map(label => label.name);
46+
47+
// Count different types of labels
48+
const typeLabels = currentLabels.filter(label => label.startsWith('type:'));
49+
const areaLabels = currentLabels.filter(label => label.startsWith('area:'));
50+
51+
// If 3+ types or areas, add comprehensive label and suggest minor release
52+
if (typeLabels.length >= 3 || areaLabels.length >= 3) {
53+
// Add comprehensive label
54+
if (!currentLabels.includes('type: comprehensive')) {
55+
await github.rest.issues.addLabels({
56+
owner: context.repo.owner,
57+
repo: context.repo.repo,
58+
issue_number: pr.number,
59+
labels: ['type: comprehensive']
60+
});
61+
}
62+
63+
// Auto-suggest minor release for comprehensive changes
64+
const releaseLabels = currentLabels.filter(label => label.startsWith('release:'));
65+
if (releaseLabels.length === 0) {
66+
await github.rest.issues.addLabels({
67+
owner: context.repo.owner,
68+
repo: context.repo.repo,
69+
issue_number: pr.number,
70+
labels: ['release: minor']
71+
});
72+
}
73+
}
74+
3475
- name: Validate PR labels
3576
id: validate-labels
3677
uses: actions/github-script@v7
3778
with:
3879
script: |
39-
const pr = context.payload.pull_request;
40-
const labels = pr.labels.map(label => label.name);
80+
// Re-fetch labels after auto-labeling
81+
const { data: updatedPr } = await github.rest.pulls.get({
82+
owner: context.repo.owner,
83+
repo: context.repo.repo,
84+
pull_number: context.payload.pull_request.number
85+
});
86+
const labels = updatedPr.labels.map(label => label.name);
4187
4288
const releaseLabels = labels.filter(label => label.startsWith('release:'));
4389
const typeLabels = labels.filter(label => label.startsWith('type:'));
@@ -116,12 +162,6 @@ jobs:
116162
117163
return invalidCommits.length === 0;
118164
119-
- name: Auto-label PR based on files
120-
uses: actions/labeler@v5
121-
with:
122-
repo-token: "${{ secrets.GITHUB_TOKEN }}"
123-
configuration-path: .github/labeler.yml
124-
125165
- name: Label PR size
126166
uses: codelytv/pr-size-labeler@v1
127167
with:

LICENSE

Lines changed: 1 addition & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,6 @@
1-
GNU AFFERO GENERAL PUBLIC LICENSE
2-
Version 3, 19 November 2007
3-
4-
Copyright (C) 2024 Billy Bryant
5-
Copyright (C) 2024 Sergey Parfenyuk (original MIT-licensed author)
6-
7-
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
8-
9-
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
10-
11-
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
12-
13-
---
14-
15-
## MIT License Attribution
16-
17-
Portions of this software were originally licensed under the MIT License by Sergey Parfenyuk (2024). The original MIT license text is included below for attribution purposes only:
18-
191
MIT License
202

21-
Copyright (c) 2024 Sergey Parfenyuk
3+
Copyright (c) 2019
224

235
Permission is hereby granted, free of charge, to any person obtaining a copy
246
of this software and associated documentation files (the "Software"), to deal
@@ -37,34 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
3719
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
3820
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
3921
SOFTWARE.
40-
41-
---
42-
43-
## Full AGPL-3.0-or-later License
44-
45-
GNU AFFERO GENERAL PUBLIC LICENSE
46-
Version 3, 19 November 2007
47-
48-
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
49-
50-
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
51-
52-
Preamble
53-
54-
The GNU Affero General Public License is a free, copyleft license for software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software.
55-
56-
The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users.
57-
58-
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.
59-
60-
Developers that use our General Public Licenses protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License which gives you legal permission to copy, distribute and/or modify the software.
61-
62-
A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to incorporate. Many developers of free software are heartened and encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its source code to the public.
63-
64-
The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available to the community. It requires the operator of a network server to provide the source code of the modified version running there to the users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version.
65-
66-
An older license, called the Affero General Public License and published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license.
67-
68-
The precise terms and conditions for copying, distribution and modification follow.
69-
70-
[...AGPL-3.0-or-later full text continues here, as found at https://www.gnu.org/licenses/agpl-3.0-standalone.html...]

0 commit comments

Comments
 (0)