sp-dev-fx-webparts/samples/react-openai-devops
dependabot[bot] 3216a66e52
Bump browserify-sign from 4.2.1 to 4.2.2 in /samples/react-openai-devops
Bumps [browserify-sign](https://github.com/crypto-browserify/browserify-sign) from 4.2.1 to 4.2.2.
- [Changelog](https://github.com/browserify/browserify-sign/blob/main/CHANGELOG.md)
- [Commits](https://github.com/crypto-browserify/browserify-sign/compare/v4.2.1...v4.2.2)

---
updated-dependencies:
- dependency-name: browserify-sign
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-28 04:26:12 +00:00
..
assets
config
fast-serve
src
teams
.eslintrc.js
.gitignore
.npmignore
.yo-rc.json
README.md
gulpfile.js
package-lock.json Bump browserify-sign from 4.2.1 to 4.2.2 in /samples/react-openai-devops 2023-10-28 04:26:12 +00:00
package.json
tsconfig.json

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.