Exercise - Add new property
In this exercise, you'll extend your connector's schema with additional GitHub-specific properties and reingest the data to see the enhanced information in Microsoft 365.
Learning objective
Add a new property to your connector's schema (such as GitHub issue labels), update the data model and ingestion logic, and rerun the connector to see the enhanced data.
Scenario
Your basic connector is working well, but users want more detailed information about GitHub issues. They want to see issue labels or assignee information to better understand issue context. You'll enhance your connector to capture and index this additional data.
Task 1: Add labels property to the schema
Extend your connector's schema to include GitHub issue labels.
In your VS Code project, open
/src/references/schema.json.Locate the
propertiesarray in the schema definition.Add a new property for labels after the existing properties:
{ "name": "labels", "type": "stringCollection", "isQueryable": true, "isSearchable": true, "isRetrievable": true }Your complete properties array should now include:
titleurlcontentstatenumberlabels(new)
Save the file.
Task 2: Update the data model
Update your TypeScript data model to include the new labels property.
Open
/src/models/Item.ts.Locate the interface definition for your GitHub issue item.
Add a
labelsproperty to the interface:labels?: string[];Save the file.
Task 3: Modify data transformation logic
Update the data fetching and transformation logic to include labels from the GitHub API.
Open the file in
/src/custom/that handles data transformation (look for GitHub API integration code).Find the section where GitHub issue data is mapped to your connector's data model.
Add logic to extract and include labels:
// In the data transformation function labels: issue.labels?.map(label => label.name) || []This extracts the label names from GitHub's label objects and creates a string array.
Save the file.
Task 4: Redeploy schema and reingest data
Run your connector again to deploy the updated schema and ingest data with the new property.
Stop any currently running connector instances.
In the VS Code terminal, build your project:
npm run buildPress F5 to start the connector again.
The connector will:
- Update the existing external connection with the new schema
- Reingest all GitHub issues with the enhanced data including labels
Monitor the terminal output to see the ingestion progress with the new labels property.
Wait for the process to complete (5-15 minutes).
Task 5: Verify enhanced data in Microsoft 365
Check that your GitHub issues now include label information.
Go to Microsoft 365 Admin Center > Search & intelligence > Data sources.
Find your GitHub Issues Connector and select on it.
Verify that the schema now includes the
labelsproperty.Check that the items count reflects the reingestion.
Task 6: Test enhanced Copilot queries
Test whether Copilot can now use the labels information in its responses.
Open Microsoft 365 Copilot.
Try queries that reference labels:
- "What Microsoft 365 Agents Toolkit samples issues are labeled as bugs?"
- "Show me issues with the 'feature request' label in the Microsoft 365 Agents Toolkit samples repository"
- "What are the most common labels on issues in the Microsoft 365 Agents Toolkit samples repository?"
Observe whether Copilot's responses now include label information and can filter by labels.
Optional challenge: Add assignee property
If you want to go even further, add an assignee property following the same pattern on your own.
Add
assigneeproperty to schema.json:{ "name": "assignee", "type": "string", "isQueryable": true, "isSearchable": true, "isRetrievable": true }Update the data model and transformation logic to include
assignee: issue.assignee?.login || "Unassigned".Redeploy and test queries about issue assignments.
What you've accomplished
You've successfully enhanced your connector with additional GitHub-specific data. Your accomplishments include:
Extended the schema - Added new properties to capture more detailed GitHub issue information
Updated data model - Modified TypeScript interfaces to support the new data
Enhanced transformation logic - Updated code to extract and map additional GitHub API data
Re-deployed successfully - Updated the live connector with the new schema and data
Verified enhanced functionality - Confirmed that Copilot can now use the additional information
Your connector now provides richer, more useful data about GitHub issues, making it more valuable for users who need detailed issue context in Microsoft 365 Copilot.