diff --git a/.github/workflows/artifact-comment.yml b/.github/workflows/artifact-comment.yml
index d032dd67..949cb8a9 100644
--- a/.github/workflows/artifact-comment.yml
+++ b/.github/workflows/artifact-comment.yml
@@ -29,7 +29,30 @@ jobs:
uses: actions/github-script@v8
with:
script: |
- // Handle repository_dispatch, pull_request, and manual dispatch events
+ // Check if we're running from a fork (more precise detection)
+ const targetRepo = context.repo.owner + '/' + context.repo.repo;
+ const prHeadRepo = context.payload.pull_request?.head?.repo?.full_name;
+ const workflowHeadRepo = context.payload.workflow_run?.head_repository?.full_name;
+
+ // For debugging
+ console.log('🔍 Repository detection:');
+ console.log('- Target repository:', targetRepo);
+ console.log('- PR head repository:', prHeadRepo || 'N/A');
+ console.log('- Workflow head repository:', workflowHeadRepo || 'N/A');
+ console.log('- Event name:', context.eventName);
+
+ // Only skip if it's actually a different repository (fork)
+ const isFromFork = prHeadRepo && prHeadRepo !== targetRepo;
+ const workflowFromFork = workflowHeadRepo && workflowHeadRepo !== targetRepo;
+
+ if (isFromFork || workflowFromFork) {
+ console.log('🚫 Workflow running from fork - skipping comment creation to avoid permission errors');
+ console.log('Fork repository:', prHeadRepo || workflowHeadRepo);
+ console.log('Target repository:', targetRepo);
+ return;
+ }
+
+ console.log('✅ Same repository - proceeding with comment creation'); // Handle repository_dispatch, pull_request, and manual dispatch events
let pr;
let targetCommitSha;
@@ -403,34 +426,53 @@ jobs:
commentBody += `*Auto-generated by [GitHub Actions](https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId})*`;
commentBody += `\n`;
- // Find existing bot comment to update
- const { data: comments } = await github.rest.issues.listComments({
- owner: context.repo.owner,
- repo: context.repo.repo,
- issue_number: pr.number
- });
-
- const botComment = comments.find(comment =>
- comment.user.type === 'Bot' &&
- comment.body.includes('')
- );
-
- if (botComment) {
- // Update existing comment
- await github.rest.issues.updateComment({
+ // Try to find existing bot comment to update (with permission check)
+ try {
+ const { data: comments } = await github.rest.issues.listComments({
owner: context.repo.owner,
repo: context.repo.repo,
- comment_id: botComment.id,
- body: commentBody
+ issue_number: pr.number
});
- console.log(`✅ Updated comment ${botComment.id} on PR #${pr.number}`);
- } else {
- // Create new comment
- await github.rest.issues.createComment({
- owner: context.repo.owner,
- repo: context.repo.repo,
- issue_number: pr.number,
- body: commentBody
- });
- console.log(`✅ Created new comment on PR #${pr.number}`);
+
+ const botComment = comments.find(comment =>
+ comment.user.type === 'Bot' &&
+ comment.body.includes('')
+ );
+
+ if (botComment) {
+ // Update existing comment
+ await github.rest.issues.updateComment({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ comment_id: botComment.id,
+ body: commentBody
+ });
+ console.log(`✅ Updated comment ${botComment.id} on PR #${pr.number}`);
+ } else {
+ // Create new comment
+ await github.rest.issues.createComment({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ issue_number: pr.number,
+ body: commentBody
+ });
+ console.log(`✅ Created new comment on PR #${pr.number}`);
+ }
+ } catch (error) {
+ if (error.status === 403) {
+ console.log('🚫 Permission denied - likely running from a fork. Skipping comment creation.');
+ console.log('Error details:', error.message);
+
+ // Log the build status instead of commenting
+ console.log('📊 Build Status Summary:');
+ for (const target of buildTargets) {
+ const matchingStatus = buildStatuses[target.statusKey];
+ if (matchingStatus) {
+ console.log(`- ${target.name}: ${matchingStatus.status}/${matchingStatus.conclusion || 'none'}`);
+ }
+ }
+ } else {
+ // Re-throw other errors
+ throw error;
+ }
}
diff --git a/components/settings/HomeIndex.tsx b/components/settings/HomeIndex.tsx
index e1e08d09..a212f0a8 100644
--- a/components/settings/HomeIndex.tsx
+++ b/components/settings/HomeIndex.tsx
@@ -460,12 +460,7 @@ export const HomeIndex = () => {
style={{ marginTop: Platform.isTV ? 0 : -100 }}
contentContainerStyle={{ paddingTop: Platform.isTV ? 0 : 100 }}
>
- {
- console.log(`Now viewing carousel item ${index}`);
- }}
- />
+