@stackoverflow/backstage-stack-overflow-teams-collator 1.5.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -10
- package/config.d.ts +4 -4
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
|
-
# Stack
|
|
2
|
+
# Stack Internal Search Backend Module
|
|
3
3
|
|
|
4
|
-
This module for the search plugin is an enhanced version of the original [Stack Overflow collator](https://github.com/backstage/backstage/tree/master/plugins/search-backend-module-stack-overflow-collator). It provides additional information while coded to work specifically with Stack
|
|
4
|
+
This module for the search plugin is an enhanced version of the original [Stack Overflow Internal collator](https://github.com/backstage/backstage/tree/master/plugins/search-backend-module-stack-overflow-collator). It provides additional information while coded to work specifically with Stack Internal API Version 3.
|
|
5
5
|
|
|
6
6
|
## Getting started
|
|
7
7
|
|
|
@@ -13,24 +13,24 @@ To use any of the functionality this plugin provides, you need to start by confi
|
|
|
13
13
|
|
|
14
14
|
```yaml
|
|
15
15
|
stackoverflow:
|
|
16
|
-
baseUrl: https://api.stackoverflowteams.com # alternative: your Stack
|
|
16
|
+
baseUrl: https://api.stackoverflowteams.com # alternative: your Stack Internal Enterprise site
|
|
17
17
|
teamName: $STACK_OVERFLOW_TEAM_NAME # optional if you are on Enterprise
|
|
18
18
|
apiAccessToken: $STACK_OVERFLOW_API_ACCESS_TOKEN
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
### Stack
|
|
21
|
+
### Stack Internal
|
|
22
22
|
|
|
23
|
-
If you have a private Stack Overflow instance and/or a private Stack Overflow Team you will need to supply a Personal Access Token. You can read more about how to set this up by going to [Stack Overflow's Help Page](https://stackoverflowteams.help/en/articles/7913768-stack-overflow-for-teams-api-v3).
|
|
23
|
+
If you have a private Stack Overflow Internal instance and/or a private Stack Overflow Internal Team you will need to supply a Personal Access Token. You can read more about how to set this up by going to [Stack Overflow Internal's Help Page](https://stackoverflowteams.help/en/articles/7913768-stack-overflow-for-teams-api-v3).
|
|
24
24
|
|
|
25
25
|
## Areas of Responsibility
|
|
26
26
|
|
|
27
|
-
This
|
|
27
|
+
This Stack Overflow Internal backend plugin is primarily responsible for the following:
|
|
28
28
|
|
|
29
|
-
- Provides a `StackOverflowQuestionsCollatorFactory`, which can be used in the search backend to index
|
|
29
|
+
- Provides a `StackOverflowQuestionsCollatorFactory`, which can be used in the search backend to index Stack Overflow Internal questions to your Backstage Search.
|
|
30
30
|
|
|
31
|
-
### Index Stack Overflow Questions to search
|
|
31
|
+
### Index Stack Overflow Internal Questions to search
|
|
32
32
|
|
|
33
|
-
Before you are able to start index
|
|
33
|
+
Before you are able to start index Stack Overflow Internal questions to search, you need to go through the [search getting started guide](https://backstage.io/docs/features/search/getting-started).
|
|
34
34
|
|
|
35
35
|
When you have your `packages/backend/src/plugins/search.ts` file ready to make modifications, add the following code snippet to add the `StackOverflowQuestionsCollatorFactory`. Note that you can optionally modify the `requestParams`, otherwise it will defaults to `{ order: 'desc', sort: 'activity' }`.
|
|
36
36
|
|
|
@@ -49,7 +49,7 @@ indexBuilder.addCollator({
|
|
|
49
49
|
|
|
50
50
|
## New Backend System
|
|
51
51
|
|
|
52
|
-
This package exports a module that extends the search backend to also indexing the questions exposed by the [`Stack
|
|
52
|
+
This package exports a module that extends the search backend to also indexing the questions exposed by the [`Stack Internal API version 3`](https://stackoverflowteams.help/en/articles/7913768-stack-overflow-for-teams-api-v3).
|
|
53
53
|
|
|
54
54
|
### Installation
|
|
55
55
|
|
package/config.d.ts
CHANGED
|
@@ -16,22 +16,22 @@
|
|
|
16
16
|
|
|
17
17
|
export interface Config {
|
|
18
18
|
/**
|
|
19
|
-
* Configuration options for the
|
|
19
|
+
* Configuration options for the Stack Overflow Internal plugin
|
|
20
20
|
*/
|
|
21
21
|
stackoverflow?: {
|
|
22
22
|
/**
|
|
23
|
-
* The base url of the Stack Overflow API used for the plugin, if no BaseUrl is provided it will default to https://api.stackoverflowteams.com
|
|
23
|
+
* The base url of the Stack Overflow Internal API used for the plugin, if no BaseUrl is provided it will default to https://api.stackoverflowteams.com
|
|
24
24
|
*/
|
|
25
25
|
baseUrl?: string;
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
|
-
* The API Access Token to authenticate to Stack Overflow API Version 3
|
|
28
|
+
* The API Access Token to authenticate to Stack Overflow Internal API Version 3
|
|
29
29
|
* @visibility secret
|
|
30
30
|
*/
|
|
31
31
|
apiAccessToken: string;
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
|
-
* The name of the team for a Stack
|
|
34
|
+
* The name of the team for a Stack Internal account. When teamName is provided baseUrl will always be https://api.stackoverflowteams.com
|
|
35
35
|
*/
|
|
36
36
|
teamName?: string;
|
|
37
37
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stackoverflow/backstage-stack-overflow-teams-collator",
|
|
3
|
-
"version": "1.5.
|
|
4
|
-
"description": "A module for the search backend that exports
|
|
3
|
+
"version": "1.5.1",
|
|
4
|
+
"description": "A module for the search backend that exports Stack Internal modules",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "backend-plugin-module",
|
|
7
7
|
"pluginId": "search",
|