Connect GitHub to AISOQL
Connecting takes about two minutes and has two parts: install the AISOQL app on GitHub, then link the repositories your team may use. Files can only be pulled from linked repositories.
Before you start
- GitHub integration is part of the Business and Team plans.
- You need to be an owner or admin of your AISOQL organization to connect GitHub and link repositories. Members can pull files once a repository is linked.
- On GitHub you need permission to install apps on the account or organization that owns the repository. If you don't have it, GitHub sends an approval request to the owner (see below).
Step 1: Connect GitHub
- In AISOQL, open Account & usage → Organization and find the GitHub card.
- Click Connect GitHub. You're taken to GitHub.
- Choose where to install the app: your personal account or your company's GitHub organization.
- Choose Only select repositories and pick the repositories that hold your Salesforce code. (All repositories also works, but giving access only to what you need is safer.)
- Click Install & Authorize. GitHub sends you back to AISOQL, and the card shows Connected.
AISOQL checks with GitHub that your GitHub account can really see that installation before it's saved, so nobody can attach someone else's repositories.
Step 2: Link a repository Don't skip this
Connecting GitHub doesn't share anything with your team yet. You choose exactly which repositories AISOQL may use.
- On the same GitHub card, under Link a repository, pick a repository from the list.
- Click Link repository. It appears under Repositories AISOQL may use.
- Repeat for any other repositories. You can Unlink one at any time.
Don't see the repository in the list? The app doesn't have access to it yet. Click configure the app on the card, add the repository on GitHub, then reload the Organization page.
Step 3: Pull a file into Update Component
- Open Code Generator → Update existing code.
- Click Pull a file from GitHub above Current code.
- Pick the repository and branch. The default branch is listed first.
- Type part of the file name (for example
AccountTrigger) and select the file. Salesforce source underforce-app/is listed first. - Click Load into Current code. The code and its file path are filled in for you.
- Describe the change and click Update Component. Then send it back as a pull request.
AISOQL remembers exactly which version of the file you pulled (branch and commit), so it can check for conflicts with newer changes on that branch before you deploy.
Step 4: Send the change back to GitHub
- After Update Component finishes, a Send to GitHub panel appears under the result, showing the repository, branch and file.
- Click Check branch and open pull request.
- AISOQL compares your version with the branch as it is now:
- Nobody else changed the file: your change is pushed.
- Someone changed other lines of the file: both sets of changes are merged and pushed.
- Someone changed the same lines: nothing is sent. You see the overlapping lines; pull the latest version, re-apply your change and send again.
- AISOQL pushes to a new branch named
aisoql/…and opens a pull request into the branch you pulled from. Review and merge it on GitHub as usual.
Merge check before deploying to Salesforce
If the code you deploy from the Deployment Center was pulled from GitHub, AISOQL first checks that branch again.
- If the file hasn't changed, or changed only in other lines, the deploy goes ahead.
- If it changed in the same lines, or GitHub can't be reached, the deploy is blocked, so you don't overwrite a teammate's newer work in your org.
- An organization admin or owner can deploy anyway by entering a reason. The override is recorded in the audit log.
Code that wasn't pulled from GitHub isn't affected by this check.
What AISOQL can and can't do with your repositories
| Reads | Files from linked repositories only, when someone in your organization pulls one. |
|---|---|
| Writes | Only to a new branch named aisoql/…, with a pull request for your team to review. Never to an existing branch, never to your default branch, and never inside .github/. |
| Stores | Which repositories are linked and which file versions were pulled. No GitHub passwords or tokens are stored; access is requested fresh for each action and limited to one repository. |
| Permissions | Repository contents and pull requests (read and write), plus metadata (read-only). Nothing else. |
If your company owns the GitHub organization
If you aren't an owner of the GitHub organization, step 1 sends an installation request to its owners instead of installing. AISOQL shows a message saying the request was sent.
- Ask a GitHub organization owner to approve the AISOQL app (GitHub notifies them, and they can also find it under the organization's Settings → GitHub Apps).
- Once it's approved, come back to the Organization page in AISOQL and click Connect GitHub again to finish.
Disconnecting
- In AISOQL, click Disconnect next to the GitHub account on the Organization page. This removes the connection and all linked repositories from AISOQL.
- To remove the app from GitHub completely, go to GitHub Settings → Applications → Installed GitHub Apps, choose AISOQL, then Uninstall.
Troubleshooting
There's no "Pull a file from GitHub" box in Update Component
No repository is linked yet. Complete step 2 on the Organization page.
"That GitHub installation isn't visible to your GitHub account"
You signed in to GitHub with a different account from the one that can see the installation. Sign in to GitHub with the right account and click Connect GitHub again.
"Start the GitHub connection from your Organization page"
The app was installed directly on GitHub. Go to the Organization page in AISOQL and click Connect GitHub, so the two accounts can be matched safely.
"GitHub refused access"
The app was uninstalled or no longer has access to that repository. Check the app's repository access on GitHub (configure the app), or disconnect and connect again.
"GitHub integration is part of the Business and Team plans"
Your organization doesn't have an active subscription. Start or renew it under Organization → Billing.
Still stuck? Contact us.