You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Add a comment to the PR indicating tests were triggered
83
-
if (context.issue.number) {
84
-
await github.rest.issues.createComment({
85
-
owner: context.repo.owner,
86
-
repo: context.repo.repo,
87
-
issue_number: context.issue.number,
88
-
body: `🚀 **Preview release created!**\n\nsupabase-js CI tests have been automatically triggered on feature branch to verify compatibility.\n\n**Preview package:** \`${{ needs.preview.outputs.preview-url }}\`\n\nResults will be posted here once testing is complete.`
89
-
});
90
-
}
91
90
} catch (error) {
92
91
console.error('Failed to trigger supabase-js tests:', error);
93
-
if (context.issue.number) {
94
-
await github.rest.issues.createComment({
95
-
owner: context.repo.owner,
96
-
repo: context.repo.repo,
97
-
issue_number: context.issue.number,
98
-
body: `⚠️ **Preview release created, but failed to trigger supabase-js tests**\n\n**Preview package:** \`${{ needs.preview.outputs.preview-url }}\`\n\nError: ${error.message}\n\nPlease manually verify compatibility or contact the team.`
99
-
});
100
-
}
101
92
throw error;
102
93
}
94
+
95
+
- name: Comment on PR
96
+
if: github.event_name == 'pull_request'
97
+
uses: actions/github-script@v7
98
+
with:
99
+
github-token: ${{ secrets.GITHUB_TOKEN }}
100
+
script: |
101
+
await github.rest.issues.createComment({
102
+
owner: context.repo.owner,
103
+
repo: context.repo.repo,
104
+
issue_number: context.issue.number,
105
+
body: `🚀 **Preview release created!**\n\nsupabase-js CI tests have been automatically triggered on feature branch to verify compatibility.\n\n**Preview package:** \`${{ needs.preview.outputs.preview-url }}\`\n\nResults will be posted here once testing is complete.`
0 commit comments