forked from github/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clear out some non-fn references to Algolia (github#20592)
* Clear out some non-fn references to Algolia * Update .github/workflows/dry-run-sync-search-indices.yml Co-authored-by: James M. Greene <[email protected]> * Update contributing/search.md Co-authored-by: James M. Greene <[email protected]> Co-authored-by: James M. Greene <[email protected]>
- Loading branch information
1 parent
42a0797
commit 1ed18e1
Showing
13 changed files
with
43 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ const eventPayload = JSON.parse(await fs.readFile(process.env.GITHUB_EVENT_PATH, | |
|
||
// This workflow-run script does the following: | ||
// 1. Gets an array of labels on a PR. | ||
// 2. Finds one with the relevant Algolia text; if none found, exits early. | ||
// 2. Finds one with the relevant search text; if none found, exits early. | ||
// 3. Gets the version substring from the label string. | ||
|
||
const labelText = 'sync-english-index-for-' | ||
|
@@ -19,18 +19,18 @@ if (!(labelsArray && labelsArray.length)) { | |
} | ||
|
||
// Find the relevant label | ||
const algoliaLabel = labelsArray | ||
const searchLabel = labelsArray | ||
.map((label) => label.name) | ||
.find((label) => label.startsWith(labelText)) | ||
|
||
// Exit early if no relevant label is found | ||
if (!algoliaLabel) { | ||
if (!searchLabel) { | ||
process.exit(0) | ||
} | ||
|
||
// Given: [email protected] | ||
// Returns: [email protected] | ||
const versionToSync = algoliaLabel.split(labelText)[1] | ||
const versionToSync = searchLabel.split(labelText)[1] | ||
|
||
// Store the version so we can access it later in the workflow | ||
setOutput('versionToSync', versionToSync) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...s/dry-run-sync-algolia-search-indices.yml → ...workflows/dry-run-sync-search-indices.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters