sp-dev-fx-webparts/samples/react-openai-devops
dependabot[bot] bd366a01c6
Bump @babel/traverse in /samples/react-openai-devops
Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.22.8 to 7.23.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse)

---
updated-dependencies:
- dependency-name: "@babel/traverse"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-26 00:51:57 +00:00
..
assets Fixed missing sample.json 2023-08-10 00:02:37 -04:00
config react-openai-devops sample added 2023-07-30 11:20:11 +01:00
fast-serve react-openai-devops sample added 2023-07-30 11:20:11 +01:00
src react-openai-devops sample added 2023-07-30 11:20:11 +01:00
teams react-openai-devops sample added 2023-07-30 11:20:11 +01:00
.eslintrc.js react-openai-devops sample added 2023-07-30 11:20:11 +01:00
.gitignore react-openai-devops sample added 2023-07-30 11:20:11 +01:00
.npmignore react-openai-devops sample added 2023-07-30 11:20:11 +01:00
.yo-rc.json react-openai-devops sample added 2023-07-30 11:20:11 +01:00
README.md react-openai-devops sample added 2023-07-30 11:20:11 +01:00
gulpfile.js react-openai-devops sample added 2023-07-30 11:20:11 +01:00
package-lock.json Bump @babel/traverse in /samples/react-openai-devops 2023-10-26 00:51:57 +00:00
package.json react-openai-devops sample added 2023-07-30 11:20:11 +01:00
tsconfig.json react-openai-devops sample added 2023-07-30 11:20:11 +01:00

README.md

OpenAI Azure DevOps Bot

Summary

The SPFx web part is a SharePoint Framework web part that allows users to view recent tasks, bugs, and commits assigned to them from a specific project in Azure DevOps. The web part uses the Open AI function calling feature to determine the user's request and intention, and then processes the relevant function using the Azure DevOps API.

Sample Web part showing Azure DevOps integration with OpenAI

Compatibility

⚠️ Important
Every SPFx version is only compatible with specific version(s) of Node.js. In order to be able to build this sample, please ensure that the version of Node on your workstation matches one of the versions listed in this section. This sample will not work on a different version of Node.
Refer to https://aka.ms/spfx-matrix for more information on SPFx compatibility.

SPFx 1.17.4 Node.js v16.18.1 Compatible with SharePoint Online Does not work with SharePoint 2019 Does not work with SharePoint 2016 (Feature Pack 2) Teams Incompatible Local Workbench Incompatible Hosted Workbench Compatible Compatible with Remote Containers

Applies to

Get your own free development tenant by subscribing to Microsoft 365 developer program

Prerequisites

  1. Access to a SharePoint online site with various tenant users granted access to various site resources directly, via AAD groups and via SharePoint groups.

  2. Create OpenAI account and get API key

  3. Create and configure Azure DevOps organizations Click here for more detail.

  4. Configure atleast one project and git repositoy. Click here for more detail. Assign yourself some tasks, bugs.

Contributors

Version history

Version Date Comments
1.0.0 July 30, 2023 Initial release

Minimal Path to Awesome

  1. Clone this repository
  2. From your command line, change your current directory to the directory containing this sample (react-openai-devops, located under samples)
  3. In the command line run:
  `npm install`
  `gulp bundle`
  `gulp package-solution`
  1. Deploy the package to your app catalog
  2. Approve the following API permission request from the SharePoint admin
      {
        "resource": "Azure DevOps",
        "scope": "user_impersonation"
      }
  1. In the command-line run:
  gulp serve --nobrowser
  1. Open the hosted workbench on a SharePoint site - i.e. https://tenant.sharepoint.com/site/sitename/_layouts/workbench.aspx
  • Add the [O3C] Smart DevOps web part to the page.
  • In the web part properties, Add OpenAPI Key under Open API Key field.
  • Select the required Azure DevOps organization from the list under Organization name dropdown. This dropdown will be auto populated based on your Azure DevOps configurations in your tenant
  • Close the web part properties pane and save and reload the page
  1. Here are some sample questions. You must provide the project name in the message to retrieve bugs and tasks. You must provide the project and repo name for recent commits.
1. show me all tasks assigned to me in O3C project
2. show me bugs assigned to me in O3C project
3. show me recent commits from spfx-dev-webparts repo in O3C project?

Features

The web part has three main functions:

  • Show all recent tasks assigned to me from a specific project: This function retrieves all recent tasks that have been assigned to the user from the specified project in Azure DevOps. The tasks are displayed in a list, and the user can click on a task to view more information about it.

  • Show all bugs assigned to me from a specific project: This function retrieves all recent bugs that have been assigned to the user from the specified project in Azure DevOps. The bugs are displayed in a list, and the user can click on a bug to view more information about it.

  • Show recent commits in a specific repository under a given project: This function retrieves all recent commits that have been made to a specific repository under the specified project in Azure DevOps. The commits are displayed in a list, and the user can click on a commit to view more information about it.