Github Actions Setup
Interact with Github using Glean Actions
Github Actions
These GitHub actions make it easier to manage your code and collaborate with your team using agents, right from Glean.
You can use GitHub actions to do the following:
- Create a PR
- Create a Branch
- Edit code
- Read a file from a branch
- Fetch logs for Workflow
- Find a diff for a PR
Using these GitHub actions, you can automate numerous tasks, such as:
- Creating a pull request with a well-summarized, automatically generated description to streamline code review.
- Creating a new feature branch directly from a conversation or workflow, reducing manual setup.
- Editing code files based on AI-suggested changes without directly interacting with the GitHub UI.
- Reading files from a specific branch to check implementation details or review changes in context.
- Fetching workflow logs to debug CI failures or deployment issues quickly via chat.
- Finding the diff for a pull request to understand exactly what changes have been made before merging.
Setup
Admins can enable this feature by going to Glean and navigating to Admin -> Actions
- Click on Add Action and select Github Actions
- Select the Github datasource you want to link these actions to. This is the instance where your github content lives.
- Setup Authentication.
Github App Setup Instructions
You can read more about Github Apps here.
1 - Create a Github App
- Go to your Github Instance
- Click on any one of your organizations.
- Click settings.
- Click GitHub Apps.
- Click New GitHub App.
- Fill the following fields:
- Name: Glean Agents
- Homepage URL: https://app.glean.com
- Identifying and authorizing users
- User authorization callback URL: Ask your AE to get this information for you
- Request user authorization: unchecked
- Post installation
- Leave blank
- Webhook
- Webhook Active: unchecked
- Repository permissions
- Set only the following:
- Repository permissions
- Actions (Read-only)
- Checks (Read-only)
- Commit statuses (Read and write)
- Contents (Read and write)
- Issues (Read and write)
- Metadata (Read-only)
- Pages (Read and write)
- Pull requests (Read and write)
- Organization permissions
- Administration (Read-only)
- Members (Read-only)
- User permissions (or Account Permissions)
- Email addresses (Read-only)
- Repository permissions
- Set only the following:
- Where can this App be installed: Any account
2 - Add the Github App Credentials to Glean
Copy the following values into the corresponding fields in Glean:
- App ID
- Client ID
- Client Secret
3 - Install the Github App
Navigate to the public link (from the Github App) and install into your organization
That’s it, you can now click on Save on Glean and start using these actions!
Once enabled, please go to Agent Builder, and either start from scratch or from a curated template. Reach out to your Account Executive (AE) if the export options are not appearing or not working as expected.