User access to GitHub Copilot
This Workflow automatically sets up developers with access to GitHub Copilot.
In this example, approval from a specific team is required. Depending on your organization's requirements, you may want to configure a User input block instead, effectively allowing users to self-serve access to GitHub Copilot without needing approval from a specific team.
Prerequisites
Before getting started:
Before calling the GitHub API endpoint in the Async HTTP request block, your organization must already be on Copilot Business or Enterprise and have seat management policies configured.
You must create a secret in Cortex.
In this example, the secret in Cortex must be named
GITHUB_COPILOT_TOKEN
.
Step 1: Start creating the Workflow
Follow the steps in the documentation to create a Workflow and configure its basic settings.
Note that Cortex has a pre-built template for this Workflow that contains the Async HTTP request block. The example on this page includes an additional Manual approval block that allows you to designate an approving team. Also in this example, the payload of the Async HTTP block includes approver": "{{actions.manual-approval.outputs.actor}}
, which references the output of the Manual approval block. This reference is not included in the pre-built Workflow template.
Step 2: Add blocks to the Workflow
The instructions on this page describe how to create this Workflow in the Cortex UI, but it is also possible to copy the Workflow YAML and add it to your workspace via the Cortex CLI. This allows you to quickly set up the example configuration then iterate on it for your own use case. Expand the tile below to learn more.
Expand the tiles below to learn about each block in this Workflow and how to configure them in the Cortex UI:
Step 3: Run the Workflow
When you run the Workflow, the following events happen:
The Workflow pauses to collect a response from a member of one of the teams specified during the Manual approval block.
After a user gives their approval, the Async HTTP request block runs. It uses the initiator of the Workflow as the GitHub user, then makes a call to the GitHub API to provision access to Copilot for that user.
Last updated
Was this helpful?