Skip to content

Commit be61be6

Browse files
committed
ci: switch to manual triggers for differential reviews and pin updates
This is just temporary - for testing purposes. Signed-off-by: Jacob Howard <[email protected]>
1 parent 6c1b2b2 commit be61be6

File tree

2 files changed

+53
-12
lines changed

2 files changed

+53
-12
lines changed

.github/workflows/security-review-diff.yaml

Lines changed: 50 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
name: Security Review (Diff)
22

33
on:
4-
pull_request:
5-
types:
6-
- opened
7-
- synchronize
8-
- reopened
9-
- ready_for_review
10-
- labeled
4+
workflow_dispatch:
5+
inputs:
6+
pull_request_number:
7+
description: "Optional pull request number to review"
8+
required: false
9+
default: ""
10+
# pull_request:
11+
# types:
12+
# - opened
13+
# - synchronize
14+
# - reopened
15+
# - ready_for_review
16+
# - labeled
1117

1218
concurrency:
1319
group: security-review-diff-${{ github.event.pull_request.number || github.run_id }}
@@ -17,6 +23,7 @@ jobs:
1723
pr-security-review:
1824
name: Pull Request Security Review
1925
runs-on: ubuntu-24.04
26+
if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
2027
permissions:
2128
contents: read
2229
pull-requests: write
@@ -45,10 +52,26 @@ jobs:
4552

4653
- name: Collect updated pin targets
4754
id: pins
55+
env:
56+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4857
run: |
58+
base_sha="${{ github.event.pull_request.base.sha }}"
59+
head_sha="${{ github.sha }}"
60+
61+
if [ "${{ github.event_name }}" = "workflow_dispatch" ] && [ -n "${{ github.event.inputs.pull_request_number }}" ]; then
62+
pr_json=$(gh pr view "${{ github.event.inputs.pull_request_number }}" --json baseRefOid,headRefOid)
63+
base_sha=$(echo "$pr_json" | jq -r '.baseRefOid')
64+
head_sha=$(echo "$pr_json" | jq -r '.headRefOid')
65+
fi
66+
67+
if [ -z "$base_sha" ] || [ -z "$head_sha" ]; then
68+
echo "Unable to resolve base/head SHA for review." >&2
69+
exit 0
70+
fi
71+
4972
task ci -- collect-updated-pins \
50-
--base "${{ github.event.pull_request.base.sha }}" \
51-
--head "${{ github.sha }}" \
73+
--base "$base_sha" \
74+
--head "$head_sha" \
5275
--workspace "${{ github.workspace }}" \
5376
--output-json pins-context.json \
5477
--summary-md pins-summary.md
@@ -63,10 +86,26 @@ jobs:
6386
6487
- name: Collect new local servers
6588
id: newservers
89+
env:
90+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6691
run: |
92+
base_sha="${{ github.event.pull_request.base.sha }}"
93+
head_sha="${{ github.sha }}"
94+
95+
if [ "${{ github.event_name }}" = "workflow_dispatch" ] && [ -n "${{ github.event.inputs.pull_request_number }}" ]; then
96+
pr_json=$(gh pr view "${{ github.event.inputs.pull_request_number }}" --json baseRefOid,headRefOid)
97+
base_sha=$(echo "$pr_json" | jq -r '.baseRefOid')
98+
head_sha=$(echo "$pr_json" | jq -r '.headRefOid')
99+
fi
100+
101+
if [ -z "$base_sha" ] || [ -z "$head_sha" ]; then
102+
echo "Unable to resolve base/head SHA for review." >&2
103+
exit 0
104+
fi
105+
67106
task ci -- collect-new-servers \
68-
--base "${{ github.event.pull_request.base.sha }}" \
69-
--head "${{ github.sha }}" \
107+
--base "$base_sha" \
108+
--head "$head_sha" \
70109
--workspace "${{ github.workspace }}" \
71110
--output-json new-servers-context.json \
72111
--summary-md new-servers-summary.md

.github/workflows/update-pins.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
name: Update MCP Server Version Pins
22

33
on:
4+
# schedule:
5+
# - cron: "0 5 * * *"
46
schedule:
5-
- cron: "0 5 * * *"
7+
- cron: "0 0 1 * *"
68
workflow_dispatch:
79

810
permissions:

0 commit comments

Comments
 (0)