Skip to content

Commit 0ebfe19

Browse files
authored
chore: initialize fullsend per-repo installation
1 parent 75b6b80 commit 0ebfe19

3 files changed

Lines changed: 221 additions & 0 deletions

File tree

‎.fullsend/config.yaml‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# fullsend per-repo configuration
2+
# https://github.com/fullsend-ai/fullsend
3+
#
4+
# This file configures fullsend for per-repo installation mode.
5+
# See https://fullsend.sh/docs/guides/infrastructure/layered-config-reference
6+
version: "1"
7+
tracker:
8+
github:
9+
allowed_targets:
10+
repos:
11+
- fullsend-ai/fullsend
12+
- fullsend-ai/agents
13+
runtime: pi
14+
roles:
15+
- review
16+
allowed_remote_resources:
17+
- https://raw.githubusercontent.com/fullsend-ai/fullsend/
18+
- https://raw.githubusercontent.com/fullsend-ai/agents/
19+
inference:
20+
project: firefly-868139
21+
wif_provider: projects/275116376890/locations/global/workloadIdentityPools/uie-github-fullsend-inference/providers/gh-repo-84372347

‎.github/workflows/fullsend.yaml‎

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
# This file is managed by fullsend. Do not edit it directly.
2+
# Upstream: https://github.com/fullsend-ai/fullsend/blob/main/internal/scaffold/fullsend-repo/.github/workflows/fullsend.yaml
3+
---
4+
# fullsend shim workflow (per-repo installation mode)
5+
# Routes events to agent workflows via reusable-dispatch.yml.
6+
# All agent execution happens in this repository's context.
7+
#
8+
# Security: pull_request_target runs the BASE branch version of this workflow,
9+
# preventing PRs from modifying it to exfiltrate credentials.
10+
# This shim never checks out PR code, so it is not vulnerable to "pwn request"
11+
# attacks.
12+
#
13+
# Routing: this shim forwards the raw event context to reusable-dispatch.yml,
14+
# which determines the stage and runs the agent inline (ADR 62).
15+
# Adding a new stage requires only a job in reusable-dispatch.yml — zero changes to this repo.
16+
#
17+
# Concurrency: per-role cancel-in-progress groups live in reusable-dispatch.yml
18+
# stage jobs with -agent- suffix. Roles operate independently (#2452).
19+
name: fullsend
20+
21+
on:
22+
issues:
23+
types: [opened, edited, labeled]
24+
issue_comment:
25+
types: [created]
26+
pull_request_target:
27+
types: [opened, synchronize, ready_for_review, closed, labeled, unlabeled]
28+
pull_request_review:
29+
types: [submitted]
30+
31+
permissions: {}
32+
33+
jobs:
34+
dispatch:
35+
if: >-
36+
(github.event_name != 'pull_request_target' && github.event_name != 'pull_request_review'
37+
|| github.event.pull_request.head.ref != 'fullsend/scaffold-install')
38+
&& (github.event_name != 'issue_comment'
39+
|| startsWith(github.event.comment.body, '/fs-'))
40+
permissions:
41+
actions: write
42+
id-token: write
43+
contents: write
44+
issues: write
45+
packages: read
46+
pull-requests: write
47+
uses: fullsend-ai/fullsend/.github/workflows/reusable-dispatch.yml@v0.56.1
48+
with:
49+
event_action: ${{ github.event.action }}
50+
mint_url: ${{ vars.FULLSEND_MINT_URL }}
51+
gcp_region: ${{ vars.FULLSEND_GCP_REGION }}
52+
project_number: ${{ vars.FULLSEND_PROJECT_NUMBER }}
53+
runner_image: ubuntu-24.04
54+
secrets:
55+
FULLSEND_GCP_WIF_PROVIDER: ${{ secrets.FULLSEND_GCP_WIF_PROVIDER }}
56+
FULLSEND_GCP_PROJECT_ID: ${{ secrets.FULLSEND_GCP_PROJECT_ID }}
57+
FULLSEND_OPENAI_API_KEY: ${{ secrets.FULLSEND_OPENAI_API_KEY }}
58+
FULLSEND_INFERENCE_GATEWAY_API_KEY: ${{ secrets.FULLSEND_INFERENCE_GATEWAY_API_KEY }}
59+
OTEL_EXPORTER_OTLP_TRACES_HEADERS: ${{ secrets.OTEL_EXPORTER_OTLP_TRACES_HEADERS }}
60+
OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.OTEL_EXPORTER_OTLP_HEADERS }}
61+
FULLSEND_JIRA_TOKEN: ${{ secrets.FULLSEND_JIRA_TOKEN }}
62+
FULLSEND_JIRA_EMAIL: ${{ secrets.FULLSEND_JIRA_EMAIL }}
63+
FULLSEND_JIRA_CLIENT_ID: ${{ secrets.FULLSEND_JIRA_CLIENT_ID }}
64+
FULLSEND_JIRA_CLIENT_SECRET: ${{ secrets.FULLSEND_JIRA_CLIENT_SECRET }}
65+
FULLSEND_GITHUB_RUNNER_SECRETS: ${{ secrets.FULLSEND_GITHUB_RUNNER_SECRETS }}
66+
67+
stop-fix:
68+
# Job-level if: is intentionally coarse — it only screens for the
69+
# /fs-fix-stop command on a PR from a non-bot. The authoritative
70+
# authorization decision (collaborator permission API + PR-author escape
71+
# hatch) is made in the step below, so a maintainer whose author_association
72+
# is not MEMBER (e.g. private org membership) is not filtered out (ADR 0054).
73+
if: >-
74+
github.event_name == 'issue_comment'
75+
&& github.event.issue.pull_request
76+
&& github.event.comment.user.type != 'Bot'
77+
&& github.event.comment.body == '/fs-fix-stop'
78+
runs-on: ubuntu-24.04
79+
permissions:
80+
contents: read
81+
issues: write
82+
pull-requests: write
83+
steps:
84+
- name: Add fullsend-no-fix label and notify
85+
env:
86+
GH_TOKEN: ${{ github.token }}
87+
PR_NUMBER: ${{ github.event.issue.number }}
88+
REPO: ${{ github.repository }}
89+
COMMENT_USER_LOGIN: ${{ github.event.comment.user.login }}
90+
ISSUE_USER_LOGIN: ${{ github.event.issue.user.login }}
91+
run: |
92+
set -euo pipefail
93+
# ADR 0054: authorize via the collaborator permission API
94+
# (admin|maintain|write), not author_association — the latter grants
95+
# contributor status to anyone with a single merged PR (issue #5421).
96+
# Mirrors has_repo_permission() in reusable-dispatch.yml, including the
97+
# custom-role --jq resolution; keep the two in sync.
98+
# The PR author may always stop the fix agent on their own PR.
99+
authorized=false
100+
if [[ -n "$COMMENT_USER_LOGIN" && "$COMMENT_USER_LOGIN" == "$ISSUE_USER_LOGIN" ]]; then
101+
authorized=true
102+
else
103+
if api_err=$(mktemp); then
104+
# $p is a jq variable; the single quotes are intentional.
105+
# shellcheck disable=SC2016
106+
if role=$(gh api "repos/$REPO/collaborators/$COMMENT_USER_LOGIN/permission" \
107+
--jq '.user.permissions as $p
108+
| if (.role_name | type) != "string" or .role_name == "" then "none"
109+
elif (.role_name | IN("admin", "maintain", "write", "triage", "read")) then .role_name
110+
elif $p == null then
111+
if (.permission | IN("admin", "write", "read")) then .permission else "none" end
112+
elif ($p | type) == "object" then
113+
if $p.admin == true then "admin"
114+
elif $p.maintain == true then "maintain"
115+
elif $p.push == true then "write"
116+
elif $p.triage == true then "triage"
117+
elif $p.pull == true then "read"
118+
else "none" end
119+
else "none" end' 2>"$api_err"); then
120+
case "$role" in
121+
admin|maintain|write) authorized=true ;;
122+
esac
123+
else
124+
echo "::warning::Permission API call failed for $COMMENT_USER_LOGIN: $(cat "$api_err")"
125+
fi
126+
rm -f "$api_err"
127+
else
128+
echo "::warning::Failed to create temp file for permission check of $COMMENT_USER_LOGIN"
129+
fi
130+
fi
131+
if [[ "$authorized" != "true" ]]; then
132+
echo "::notice::User $COMMENT_USER_LOGIN is not authorized to stop the fix agent (requires write access or PR authorship)"
133+
exit 0
134+
fi
135+
gh label create "fullsend-no-fix" --repo "$REPO" \
136+
--description "Skip bot-triggered fix agent runs" --color "FBCA04" \
137+
2>/dev/null || true
138+
gh pr edit "$PR_NUMBER" --repo "$REPO" \
139+
--add-label "fullsend-no-fix"
140+
gh pr comment "$PR_NUMBER" --repo "$REPO" \
141+
--body "Fix agent disabled for this PR. Remove the \`fullsend-no-fix\` label or use \`/fs-fix\` to re-engage."

‎.github/workflows/prioritize.yml‎

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# This file is managed by fullsend. Do not edit it directly.
2+
# Upstream: https://github.com/fullsend-ai/fullsend/blob/main/internal/scaffold/fullsend-repo/.github/workflows/prioritize.yml
3+
---
4+
# fullsend-stage: prioritize
5+
name: Prioritize
6+
7+
permissions:
8+
actions: write
9+
contents: read
10+
id-token: write
11+
issues: write
12+
13+
on:
14+
workflow_dispatch:
15+
inputs:
16+
event_type:
17+
description: Event type that triggered prioritization
18+
required: true
19+
type: string
20+
source_repo:
21+
description: Repository the event came from (owner/repo)
22+
required: true
23+
type: string
24+
event_payload:
25+
description: JSON-encoded payload of the triggering event
26+
required: true
27+
type: string
28+
project_number:
29+
description: GitHub Projects V2 project number for RICE scoring
30+
required: false
31+
type: string
32+
33+
concurrency:
34+
group: fullsend-prioritize-${{ inputs.source_repo }}-${{ fromJSON(inputs.event_payload).issue.number || fromJSON(inputs.event_payload).pull_request.number }}
35+
cancel-in-progress: true
36+
37+
jobs:
38+
prioritize:
39+
uses: fullsend-ai/fullsend/.github/workflows/reusable-prioritize.yml@v0.56.1
40+
with:
41+
event_type: ${{ inputs.event_type }}
42+
source_repo: ${{ inputs.source_repo }}
43+
event_payload: ${{ inputs.event_payload }}
44+
mint_url: ${{ vars.FULLSEND_MINT_URL }}
45+
gcp_region: ${{ vars.FULLSEND_GCP_REGION }}
46+
project_number: ${{ inputs.project_number || vars.FULLSEND_PROJECT_NUMBER }}
47+
runner_image: ubuntu-24.04
48+
secrets:
49+
FULLSEND_GCP_WIF_PROVIDER: ${{ secrets.FULLSEND_GCP_WIF_PROVIDER }}
50+
FULLSEND_GCP_PROJECT_ID: ${{ secrets.FULLSEND_GCP_PROJECT_ID }}
51+
FULLSEND_OPENAI_API_KEY: ${{ secrets.FULLSEND_OPENAI_API_KEY }}
52+
FULLSEND_INFERENCE_GATEWAY_API_KEY: ${{ secrets.FULLSEND_INFERENCE_GATEWAY_API_KEY }}
53+
OTEL_EXPORTER_OTLP_TRACES_HEADERS: ${{ secrets.OTEL_EXPORTER_OTLP_TRACES_HEADERS }}
54+
OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.OTEL_EXPORTER_OTLP_HEADERS }}
55+
FULLSEND_JIRA_TOKEN: ${{ secrets.FULLSEND_JIRA_TOKEN }}
56+
FULLSEND_JIRA_EMAIL: ${{ secrets.FULLSEND_JIRA_EMAIL }}
57+
FULLSEND_JIRA_CLIENT_ID: ${{ secrets.FULLSEND_JIRA_CLIENT_ID }}
58+
FULLSEND_JIRA_CLIENT_SECRET: ${{ secrets.FULLSEND_JIRA_CLIENT_SECRET }}
59+
FULLSEND_GITHUB_RUNNER_SECRETS: ${{ secrets.FULLSEND_GITHUB_RUNNER_SECRETS }}

0 commit comments

Comments
 (0)