feat: initial commit from workspace-mcp
Check Maintainer Edits Enabled / check-maintainer-edits (pull_request) Has been cancelled
Check Maintainer Edits Enabled / check-maintainer-edits-internal (pull_request) Has been cancelled
Docker Build and Push to GHCR / build-and-push (pull_request) Has been cancelled
Ruff / ruff (pull_request) Has been cancelled
Check Maintainer Edits Enabled / check-maintainer-edits (pull_request) Has been cancelled
Check Maintainer Edits Enabled / check-maintainer-edits-internal (pull_request) Has been cancelled
Docker Build and Push to GHCR / build-and-push (pull_request) Has been cancelled
Ruff / ruff (pull_request) Has been cancelled
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
# .github/FUNDING.yml
|
||||
github: taylorwilsdon
|
||||
|
||||
# --- Optional platforms (one value per platform) ---
|
||||
# patreon: REPLACE_ME
|
||||
# open_collective: REPLACE_ME
|
||||
# ko_fi: REPLACE_ME
|
||||
# liberapay: REPLACE_ME
|
||||
# issuehunt: REPLACE_ME
|
||||
# polar: REPLACE_ME
|
||||
# buy_me_a_coffee: REPLACE_ME
|
||||
# thanks_dev: u/gh/REPLACE_ME_GITHUB_USERNAME
|
||||
|
||||
# Tidelift uses platform/package (npm, pypi, rubygems, maven, packagist, nuget)
|
||||
# tidelift: pypi/REPLACE_ME_PACKAGE_NAME
|
||||
|
||||
# Up to 4 custom URLs (wrap in quotes if they contain :)
|
||||
# Good pattern: link to a SUPPORT.md that describes how to sponsor, or your donation page.
|
||||
# custom: ["https://REPLACE_ME_DOMAIN/sponsor", "https://github.com/REPLACE_ME_OWNER/REPLACE_ME_REPO/blob/main/SUPPORT.md"]
|
||||
@@ -0,0 +1,35 @@
|
||||
---
|
||||
name: Bug Report
|
||||
about: Create a report to help us improve Google Workspace MCP
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**Startup Logs**
|
||||
Include the startup output including everything from the Active Configuration section to "Uvicorn running"
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Platform (please complete the following information):**
|
||||
- OS: [e.g. macOS, Ubuntu, Windows]
|
||||
- Container: [if applicable, e.g. Docker)
|
||||
- Version [e.g. v1.2.0]
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
@@ -0,0 +1,20 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
||||
@@ -0,0 +1,11 @@
|
||||
# To get started with Dependabot version updates, you'll need to specify which
|
||||
# package ecosystems to update and where the package manifests are located.
|
||||
# Please see the documentation for all configuration options:
|
||||
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "" # See documentation for possible values
|
||||
directory: "/" # Location of package manifests
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
@@ -0,0 +1,31 @@
|
||||
## Description
|
||||
Brief description of the changes in this PR.
|
||||
|
||||
## Type of Change
|
||||
- [ ] Bug fix (non-breaking change which fixes an issue)
|
||||
- [ ] New feature (non-breaking change which adds functionality)
|
||||
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
|
||||
- [ ] Documentation update
|
||||
|
||||
## Testing
|
||||
- [ ] I have added tests that prove my fix is effective or that my feature works
|
||||
- [ ] New and existing unit tests pass locally with my changes
|
||||
- [ ] I have tested this change manually
|
||||
|
||||
## Checklist
|
||||
- [ ] My code follows the style guidelines of this project
|
||||
- [ ] I have performed a self-review of my own code
|
||||
- [ ] I have commented my code, particularly in hard-to-understand areas
|
||||
- [ ] My changes generate no new warnings
|
||||
- [ ] **I have enabled "Allow edits from maintainers" for this pull request**
|
||||
|
||||
## Additional Notes
|
||||
Add any other context about the pull request here.
|
||||
|
||||
---
|
||||
|
||||
**⚠️ IMPORTANT:** This repository requires that you enable "Allow edits from maintainers" when creating your pull request. This allows maintainers to make small fixes and improvements directly to your branch, speeding up the review process.
|
||||
|
||||
To enable this setting:
|
||||
1. When creating the PR, check the "Allow edits from maintainers" checkbox
|
||||
2. If you've already created the PR, you can enable this in the PR sidebar under "Allow edits from maintainers"
|
||||
@@ -0,0 +1,54 @@
|
||||
name: Check Maintainer Edits Enabled
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened, edited]
|
||||
|
||||
permissions:
|
||||
pull-requests: read
|
||||
issues: write
|
||||
|
||||
jobs:
|
||||
check-maintainer-edits:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.pull_request.head.repo.fork == true || github.event.pull_request.head.repo.full_name != github.repository
|
||||
|
||||
steps:
|
||||
- name: Check if maintainer edits are enabled
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const { data: pr } = await github.rest.pulls.get({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
pull_number: context.issue.number
|
||||
});
|
||||
|
||||
if (!pr.maintainer_can_modify) {
|
||||
await github.rest.issues.createComment({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
issue_number: context.issue.number,
|
||||
body: '⚠️ **Maintainer edits not enabled**\n\n' +
|
||||
'This repository requires that you enable "Allow edits from maintainers" for your pull request. This allows maintainers to make small fixes and improvements directly to your branch, which speeds up the review process.\n\n' +
|
||||
'**To enable this setting:**\n' +
|
||||
'1. Go to your pull request page\n' +
|
||||
'2. In the right sidebar, look for "Allow edits from maintainers"\n' +
|
||||
'3. Check the checkbox to enable it\n\n' +
|
||||
'Once you\'ve enabled this setting, this check will automatically pass. Thank you! 🙏'
|
||||
});
|
||||
|
||||
core.setFailed('Maintainer edits must be enabled for this pull request');
|
||||
} else {
|
||||
console.log('✅ Maintainer edits are enabled');
|
||||
}
|
||||
|
||||
check-maintainer-edits-internal:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.pull_request.head.repo.fork == false && github.event.pull_request.head.repo.full_name == github.repository
|
||||
|
||||
steps:
|
||||
- name: Skip check for internal PRs
|
||||
run: |
|
||||
echo "✅ Skipping maintainer edits check for internal pull request"
|
||||
echo "This check only applies to external contributors and forks"
|
||||
@@ -0,0 +1,66 @@
|
||||
name: Docker Build and Push to GHCR
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
tags:
|
||||
- 'v*.*.*'
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
|
||||
permissions: {}
|
||||
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: ${{ github.repository }}
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
id-token: write
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Log in to GitHub Container Registry
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Extract metadata (tags, labels) for Docker
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
tags: |
|
||||
type=ref,event=branch
|
||||
type=ref,event=pr
|
||||
type=semver,pattern={{version}}
|
||||
type=semver,pattern={{major}}.{{minor}}
|
||||
type=semver,pattern={{major}}
|
||||
type=sha,prefix=sha-
|
||||
type=raw,value=latest,enable={{is_default_branch}}
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
platforms: linux/amd64,linux/arm64
|
||||
@@ -0,0 +1,106 @@
|
||||
name: Publish PyPI + MCP Registry
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v*"
|
||||
workflow_dispatch:
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: "3.11"
|
||||
|
||||
- name: Resolve version from tag
|
||||
run: echo "VERSION=${GITHUB_REF_NAME#v}" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Verify tag matches pyproject version
|
||||
run: |
|
||||
PYPROJECT_VERSION="$(python - <<'PY'
|
||||
import tomllib
|
||||
with open("pyproject.toml", "rb") as f:
|
||||
data = tomllib.load(f)
|
||||
print(data["project"]["version"])
|
||||
PY
|
||||
)"
|
||||
if [ "$PYPROJECT_VERSION" != "$VERSION" ]; then
|
||||
echo "Tag version ($VERSION) does not match pyproject version ($PYPROJECT_VERSION)."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Sync server.json version with release
|
||||
run: |
|
||||
tmp="$(mktemp)"
|
||||
jq --arg version "$VERSION" '
|
||||
.version = $version
|
||||
| .packages = (
|
||||
(.packages // [])
|
||||
| map(
|
||||
if ((.registryType // .registry_type // "") == "pypi")
|
||||
then .version = $version
|
||||
else .
|
||||
end
|
||||
)
|
||||
)
|
||||
' server.json > "$tmp"
|
||||
mv "$tmp" server.json
|
||||
|
||||
- name: Validate server.json against schema
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
python -m pip install jsonschema requests
|
||||
python - <<'PY'
|
||||
import json
|
||||
import requests
|
||||
from jsonschema import Draft202012Validator
|
||||
|
||||
with open("server.json", "r", encoding="utf-8") as f:
|
||||
instance = json.load(f)
|
||||
|
||||
schema_url = instance["$schema"]
|
||||
schema = requests.get(schema_url, timeout=30).json()
|
||||
|
||||
Draft202012Validator.check_schema(schema)
|
||||
Draft202012Validator(schema).validate(instance)
|
||||
print("server.json schema validation passed")
|
||||
PY
|
||||
|
||||
- name: Build distribution
|
||||
run: |
|
||||
python -m pip install build
|
||||
python -m build
|
||||
|
||||
- name: Check package metadata
|
||||
run: |
|
||||
python -m pip install twine
|
||||
twine check dist/*
|
||||
|
||||
- name: Publish package to PyPI
|
||||
uses: pypa/gh-action-pypi-publish@release/v1
|
||||
with:
|
||||
skip-existing: true
|
||||
|
||||
- name: Install mcp-publisher
|
||||
run: |
|
||||
OS="$(uname -s | tr '[:upper:]' '[:lower:]')"
|
||||
ARCH="$(uname -m | sed 's/x86_64/amd64/' | sed 's/aarch64/arm64/')"
|
||||
curl -fsSL "https://github.com/modelcontextprotocol/registry/releases/latest/download/mcp-publisher_${OS}_${ARCH}.tar.gz" | tar xz mcp-publisher
|
||||
chmod +x mcp-publisher
|
||||
|
||||
- name: Login to MCP Registry with GitHub OIDC
|
||||
run: ./mcp-publisher login github-oidc
|
||||
|
||||
- name: Publish server to MCP Registry
|
||||
run: ./mcp-publisher publish
|
||||
@@ -0,0 +1,45 @@
|
||||
name: Ruff
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
push:
|
||||
branches: [ main ]
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
ruff:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.ref || github.ref }}
|
||||
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
- uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Install uv
|
||||
uses: astral-sh/setup-uv@v7
|
||||
- name: Install dependencies
|
||||
run: uv sync
|
||||
- name: Auto-fix ruff lint and format
|
||||
if: github.event_name == 'pull_request'
|
||||
run: |
|
||||
uv run ruff check --fix
|
||||
uv run ruff format
|
||||
- name: Commit and push fixes
|
||||
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
|
||||
run: |
|
||||
git diff --quiet && exit 0
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git add -A
|
||||
git commit -m "style: auto-fix ruff lint and format"
|
||||
git push
|
||||
- name: Validate
|
||||
run: |
|
||||
uv run ruff check
|
||||
uv run ruff format --check
|
||||
Reference in New Issue
Block a user