Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
Mirrored from https://github.com/Camo67/composio.git
Synced Nov 22, 14:30 UTC
fix(ci): fix github actions commits
jkomyno committed
Jan 20, 2026 at 14:34 UTC
1fcd7433275bcda1c3f812d78640db591c3286b4
3 files changed
+138
-3
.github/scripts/check-action-repos.sh
new
+135
@@ -0,0 +1,135 @@
1
+#!/usr/bin/env bash
2
+
3
+# Check the validity of all actions used in the workflows.
4
+#
5
+# Example output:
6
+#
7
+# ❯ .github/scripts/check-action-repos.sh
8
+# Found 18 unique uses: entries
9
+# WARN: unrecognized uses format: ---
10
+# ERROR: ref not found (tag/branch/commit): peter-evans/create-pull-request@271a8d0340265f705b14b601f8cf3c8c27d2d6cf
11
+# ERROR: ref not found (tag/branch/commit): slackapi/slack-github-action@b4590ed38561d3cb7512cbee19cef0e0a6064ff1
12
+
13
+set -euo pipefail
14
+
15
+fail=0
16
+
17
+# Collect all `uses:` entries
18
+mapfile -t USES < <(
19
+ yq -r '
20
+ .jobs[]?.steps[]? |
21
+ select(has("uses")) |
22
+ .uses
23
+ ' .github/workflows/*.yml .github/workflows/*.yaml 2>/dev/null \
24
+ | sed '/^null$/d' \
25
+ | sort -u
26
+)
27
+
28
+if [[ ${#USES[@]} -eq 0 ]]; then
29
+ echo "No uses: entries found."
30
+ exit 0
31
+fi
32
+
33
+echo "Found ${#USES[@]} unique uses: entries"
34
+
35
+check_local() {
36
+ local p="$1"
37
+ if [[ ! -e "$p" ]]; then
38
+ echo "ERROR: local action path does not exist: $p"
39
+ return 1
40
+ fi
41
+ if [[ -d "$p" ]]; then
42
+ if [[ -f "$p/action.yml" || -f "$p/action.yaml" ]]; then
43
+ return 0
44
+ fi
45
+ echo "ERROR: local action dir missing action.yml/action.yaml: $p"
46
+ return 1
47
+ fi
48
+ # If a file is used directly (rare), just ensure it exists
49
+ return 0
50
+}
51
+
52
+# For remote actions, verify:
53
+# - repo exists
54
+# - ref exists (tag/branch/sha)
55
+# - action.yml or action.yaml exists at path (or root) at that ref
56
+check_remote() {
57
+ local spec="$1" # owner/repo/path@ref OR owner/repo@ref
58
+ local before_at="${spec%@*}"
59
+ local ref="${spec#*@}"
60
+
61
+ local owner_repo="${before_at%%/*}/${before_at#*/}"
62
+ owner_repo="${owner_repo%%/*}/${owner_repo#*/}" # keep first two segments
63
+
64
+ local owner="${before_at%%/*}"
65
+ local rest="${before_at#*/}"
66
+ local repo="${rest%%/*}"
67
+
68
+ local path=""
69
+ if [[ "$before_at" == */*/* ]]; then
70
+ path="${before_at#"$owner/$repo/"}"
71
+ fi
72
+
73
+ # 1) repo exists
74
+ if ! gh api -H "Accept: application/vnd.github+json" "/repos/$owner/$repo" >/dev/null 2>&1; then
75
+ echo "ERROR: repo not found or inaccessible: $owner/$repo (from $spec)"
76
+ return 1
77
+ fi
78
+
79
+ # 2) ref exists (try tag, branch, then commit)
80
+ if ! gh api -H "Accept: application/vnd.github+json" "/repos/$owner/$repo/git/ref/tags/$ref" >/dev/null 2>&1 \
81
+ && ! gh api -H "Accept: application/vnd.github+json" "/repos/$owner/$repo/git/ref/heads/$ref" >/dev/null 2>&1 \
82
+ && ! gh api -H "Accept: application/vnd.github+json" "/repos/$owner/$repo/commits/$ref" >/dev/null 2>&1
83
+ then
84
+ echo "ERROR: ref not found (tag/branch/commit): $spec"
85
+ return 1
86
+ fi
87
+
88
+ # 3) action metadata exists at path (or root)
89
+ local base_path="${path}"
90
+ if [[ -z "$base_path" ]]; then
91
+ base_path=""
92
+ fi
93
+
94
+ local try_paths=()
95
+ if [[ -z "$base_path" ]]; then
96
+ try_paths=("action.yml" "action.yaml")
97
+ else
98
+ try_paths=("$base_path/action.yml" "$base_path/action.yaml")
99
+ fi
100
+
101
+ for p in "${try_paths[@]}"; do
102
+ if gh api -H "Accept: application/vnd.github+json" \
103
+ "/repos/$owner/$repo/contents/$p?ref=$ref" >/dev/null 2>&1
104
+ then
105
+ return 0
106
+ fi
107
+ done
108
+
109
+ echo "ERROR: action metadata not found at ref: $spec (looked for action.yml/action.yaml under '${base_path:-repo root}')"
110
+ return 1
111
+}
112
+
113
+for u in "${USES[@]}"; do
114
+ # Ignore reusable workflows here: they also use `uses:` but are `./.github/workflows/x.yml` or `owner/repo/.github/workflows/x.yml@ref`
115
+ # If you want to validate those too, add logic similar to check_local/check_remote for workflow files.
116
+ if [[ "$u" == docker://* ]]; then
117
+ echo "SKIP (docker image): $u"
118
+ continue
119
+ fi
120
+
121
+ if [[ "$u" == ./* ]]; then
122
+ if ! check_local "$u"; then fail=1; fi
123
+ continue
124
+ fi
125
+
126
+ # Remote action or reusable workflow reference (both look like owner/repo/...@ref)
127
+ if [[ "$u" == *@* && "$u" == */* ]]; then
128
+ if ! check_remote "$u"; then fail=1; fi
129
+ continue
130
+ fi
131
+
132
+ echo "WARN: unrecognized uses format: $u"
133
+done
134
+
135
+exit $fail
.github/workflows/generate-sdk-docs.yml
+2
-2
@@ -27,7 +27,7 @@ jobs:
27
- run: pnpm --filter @composio/core generate:docs
28
29
- name: Create Pull Request
30
- uses: peter-evans/create-pull-request@271a8d0340265f705b14b601f8cf3c8c27d2d6cf # v7.0.8
30
+ uses: peter-evans/create-pull-request@98357b18bf14b5342f975ff684046ec3b2a07725 # v8.0.0
31
with:
32
commit-message: 'docs: auto-generate TypeScript SDK reference'
33
title: 'docs: Update TypeScript SDK reference'
@@ -52,7 +52,7 @@ jobs:
52
- run: cd python && uv run --with griffe python scripts/generate-docs.py
53
54
- name: Create Pull Request
55
- uses: peter-evans/create-pull-request@271a8d0340265f705b14b601f8cf3c8c27d2d6cf # v7.0.8
55
+ uses: peter-evans/create-pull-request@98357b18bf14b5342f975ff684046ec3b2a07725 # v8.0.0
56
with:
57
commit-message: 'docs: auto-generate Python SDK reference'
58
title: 'docs: Update Python SDK reference'
.github/workflows/ts.release.yml
+1
-1
@@ -49,7 +49,7 @@ jobs:
49
50
- name: Send Slack Notification
51
if: steps.changesets.outputs.published == 'true'
52
- uses: slackapi/slack-github-action@b4590ed38561d3cb7512cbee19cef0e0a6064ff1 # v1.24.0
52
+ uses: slackapi/slack-github-action@fcfb566f8b0aab22203f066d80ca1d7e4b5d05b3 # v1.27.1
53
with:
54
payload: |
55
{