Skip to content

Fix targetInstallation scope error in bot API - #138

Merged
github-actions[bot] merged 1 commit into
mainfrom
fix/target-installation-scope-error
Oct 13, 2025
Merged

github-actions[bot] merged 1 commit into
mainfrom
fix/target-installation-scope-error

Conversation

@ishaileshpant

Copy link
Copy Markdown
Collaborator

🐛 Problem

The content submission was failing with error: targetInstallation is not defined

🔍 Root Cause

The targetInstallation variable was declared inside a try-catch block but was being used outside of it, causing a scope error.

✅ Solution

  • Declare targetInstallation variable outside the try-catch block
  • Assign it inside the try-catch block
  • Make it accessible throughout the function scope

🧪 Testing

  • Fixed variable scope issue
  • Test content submission locally
  • Verify end-to-end functionality

🎯 Expected Result

Content submission should work without the targetInstallation is not defined error.

Fixes the issue where users get:

Content submission is temporarily unavailable. GitHub App error.
details: { githubAppError: "targetInstallation is not defined" }

- Declare targetInstallation variable outside try-catch block
- Fixes 'targetInstallation is not defined' error in content submission
- Ensures proper variable scope for installation ID access
@vercel

vercel Bot commented Oct 13, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
prepguides-dev Ready Ready Preview Comment Oct 13, 2025 4:32pm

@ishaileshpant

Copy link
Copy Markdown
Collaborator Author

/approve

@github-actions
github-actions Bot merged commit 0356ef5 into main Oct 13, 2025
11 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Admin-Approved and Auto-Merged!

This PR has been automatically merged to main after admin approval by @ishaileshpant.

✅ **Status**: Merged and deployed
🔗 **Commit**: `0356ef5ce9d0f14c2c455c37eb7b17082ac6d942`
📅 **Merged at**: 2025-10-13T16:36:11.447Z
👤 **Approved by**: Admin/Maintainer/Owner

Thank you for your contribution! 🎉

@ishaileshpant
ishaileshpant deleted the fix/target-installation-scope-error branch October 13, 2025 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant