1
0
mirror of synced 2026-01-09 06:03:09 -05:00

Merge pull request #15213 from github/repo-sync

repo sync
This commit is contained in:
Octomerger Bot
2022-02-07 11:39:32 -06:00
committed by GitHub
14 changed files with 3082 additions and 79 deletions

View File

@@ -47,9 +47,13 @@ jobs:
- name: Check out repo
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
with:
lfs: true
# Enables cloning the Early Access repo later with the relevant PAT
persist-credentials: 'false'
- name: Checkout LFS objects
run: git lfs checkout
- name: Gather files changed
uses: trilom/file-changes-action@a6ca26c14274c33b15e6499323aac178af06ad4b
id: get_diff_files

File diff suppressed because one or more lines are too long

View File

@@ -25494,17 +25494,16 @@
},
"permission": {
"type": "string",
"description": "<p><strong>Deprecated</strong>. The permission that new repositories will be added to the team with when none is specified. Can be one of:<br>\n* <code>pull</code> - team members can pull, but not push to or administer newly-added repositories.<br>\n* <code>push</code> - team members can pull and push, but not administer newly-added repositories.<br>\n* <code>admin</code> - team members can pull, push and administer newly-added repositories.</p>",
"description": "<p><strong>Deprecated</strong>. The permission that new repositories will be added to the team with when none is specified. Can be one of:<br>\n* <code>pull</code> - team members can pull, but not push to or administer newly-added repositories.<br>\n* <code>push</code> - team members can pull and push, but not administer newly-added repositories.</p>",
"enum": [
"pull",
"push",
"admin"
"push"
],
"default": "pull",
"name": "permission",
"in": "body",
"rawType": "string",
"rawDescription": "**Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: \n\\* `pull` - team members can pull, but not push to or administer newly-added repositories. \n\\* `push` - team members can pull and push, but not administer newly-added repositories. \n\\* `admin` - team members can pull, push and administer newly-added repositories.",
"rawDescription": "**Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: \n\\* `pull` - team members can pull, but not push to or administer newly-added repositories. \n\\* `push` - team members can pull and push, but not administer newly-added repositories.",
"childParamsGroups": []
},
"parent_team_id": {
@@ -25533,7 +25532,7 @@
"example": {
"name": "Justice League",
"description": "A great team",
"permission": "admin",
"permission": "push",
"privacy": "closed"
}
}
@@ -25609,17 +25608,16 @@
},
{
"type": "string",
"description": "<p><strong>Deprecated</strong>. The permission that new repositories will be added to the team with when none is specified. Can be one of:<br>\n* <code>pull</code> - team members can pull, but not push to or administer newly-added repositories.<br>\n* <code>push</code> - team members can pull and push, but not administer newly-added repositories.<br>\n* <code>admin</code> - team members can pull, push and administer newly-added repositories.</p>",
"description": "<p><strong>Deprecated</strong>. The permission that new repositories will be added to the team with when none is specified. Can be one of:<br>\n* <code>pull</code> - team members can pull, but not push to or administer newly-added repositories.<br>\n* <code>push</code> - team members can pull and push, but not administer newly-added repositories.</p>",
"enum": [
"pull",
"push",
"admin"
"push"
],
"default": "pull",
"name": "permission",
"in": "body",
"rawType": "string",
"rawDescription": "**Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: \n\\* `pull` - team members can pull, but not push to or administer newly-added repositories. \n\\* `push` - team members can pull and push, but not administer newly-added repositories. \n\\* `admin` - team members can pull, push and administer newly-added repositories.",
"rawDescription": "**Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: \n\\* `pull` - team members can pull, but not push to or administer newly-added repositories. \n\\* `push` - team members can pull and push, but not administer newly-added repositories.",
"childParamsGroups": []
},
{

View File

@@ -25494,17 +25494,16 @@
},
"permission": {
"type": "string",
"description": "<p><strong>Deprecated</strong>. The permission that new repositories will be added to the team with when none is specified. Can be one of:<br>\n* <code>pull</code> - team members can pull, but not push to or administer newly-added repositories.<br>\n* <code>push</code> - team members can pull and push, but not administer newly-added repositories.<br>\n* <code>admin</code> - team members can pull, push and administer newly-added repositories.</p>",
"description": "<p><strong>Deprecated</strong>. The permission that new repositories will be added to the team with when none is specified. Can be one of:<br>\n* <code>pull</code> - team members can pull, but not push to or administer newly-added repositories.<br>\n* <code>push</code> - team members can pull and push, but not administer newly-added repositories.</p>",
"enum": [
"pull",
"push",
"admin"
"push"
],
"default": "pull",
"name": "permission",
"in": "body",
"rawType": "string",
"rawDescription": "**Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: \n\\* `pull` - team members can pull, but not push to or administer newly-added repositories. \n\\* `push` - team members can pull and push, but not administer newly-added repositories. \n\\* `admin` - team members can pull, push and administer newly-added repositories.",
"rawDescription": "**Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: \n\\* `pull` - team members can pull, but not push to or administer newly-added repositories. \n\\* `push` - team members can pull and push, but not administer newly-added repositories.",
"childParamsGroups": []
},
"parent_team_id": {
@@ -25533,7 +25532,7 @@
"example": {
"name": "Justice League",
"description": "A great team",
"permission": "admin",
"permission": "push",
"privacy": "closed"
}
}
@@ -25609,17 +25608,16 @@
},
{
"type": "string",
"description": "<p><strong>Deprecated</strong>. The permission that new repositories will be added to the team with when none is specified. Can be one of:<br>\n* <code>pull</code> - team members can pull, but not push to or administer newly-added repositories.<br>\n* <code>push</code> - team members can pull and push, but not administer newly-added repositories.<br>\n* <code>admin</code> - team members can pull, push and administer newly-added repositories.</p>",
"description": "<p><strong>Deprecated</strong>. The permission that new repositories will be added to the team with when none is specified. Can be one of:<br>\n* <code>pull</code> - team members can pull, but not push to or administer newly-added repositories.<br>\n* <code>push</code> - team members can pull and push, but not administer newly-added repositories.</p>",
"enum": [
"pull",
"push",
"admin"
"push"
],
"default": "pull",
"name": "permission",
"in": "body",
"rawType": "string",
"rawDescription": "**Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: \n\\* `pull` - team members can pull, but not push to or administer newly-added repositories. \n\\* `push` - team members can pull and push, but not administer newly-added repositories. \n\\* `admin` - team members can pull, push and administer newly-added repositories.",
"rawDescription": "**Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: \n\\* `pull` - team members can pull, but not push to or administer newly-added repositories. \n\\* `push` - team members can pull and push, but not administer newly-added repositories.",
"childParamsGroups": []
},
{

View File

@@ -25997,17 +25997,16 @@
},
"permission": {
"type": "string",
"description": "<p><strong>Deprecated</strong>. The permission that new repositories will be added to the team with when none is specified. Can be one of:<br>\n* <code>pull</code> - team members can pull, but not push to or administer newly-added repositories.<br>\n* <code>push</code> - team members can pull and push, but not administer newly-added repositories.<br>\n* <code>admin</code> - team members can pull, push and administer newly-added repositories.</p>",
"description": "<p><strong>Deprecated</strong>. The permission that new repositories will be added to the team with when none is specified. Can be one of:<br>\n* <code>pull</code> - team members can pull, but not push to or administer newly-added repositories.<br>\n* <code>push</code> - team members can pull and push, but not administer newly-added repositories.</p>",
"enum": [
"pull",
"push",
"admin"
"push"
],
"default": "pull",
"name": "permission",
"in": "body",
"rawType": "string",
"rawDescription": "**Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: \n\\* `pull` - team members can pull, but not push to or administer newly-added repositories. \n\\* `push` - team members can pull and push, but not administer newly-added repositories. \n\\* `admin` - team members can pull, push and administer newly-added repositories.",
"rawDescription": "**Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: \n\\* `pull` - team members can pull, but not push to or administer newly-added repositories. \n\\* `push` - team members can pull and push, but not administer newly-added repositories.",
"childParamsGroups": []
},
"parent_team_id": {
@@ -26036,7 +26035,7 @@
"example": {
"name": "Justice League",
"description": "A great team",
"permission": "admin",
"permission": "push",
"privacy": "closed"
}
}
@@ -26112,17 +26111,16 @@
},
{
"type": "string",
"description": "<p><strong>Deprecated</strong>. The permission that new repositories will be added to the team with when none is specified. Can be one of:<br>\n* <code>pull</code> - team members can pull, but not push to or administer newly-added repositories.<br>\n* <code>push</code> - team members can pull and push, but not administer newly-added repositories.<br>\n* <code>admin</code> - team members can pull, push and administer newly-added repositories.</p>",
"description": "<p><strong>Deprecated</strong>. The permission that new repositories will be added to the team with when none is specified. Can be one of:<br>\n* <code>pull</code> - team members can pull, but not push to or administer newly-added repositories.<br>\n* <code>push</code> - team members can pull and push, but not administer newly-added repositories.</p>",
"enum": [
"pull",
"push",
"admin"
"push"
],
"default": "pull",
"name": "permission",
"in": "body",
"rawType": "string",
"rawDescription": "**Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: \n\\* `pull` - team members can pull, but not push to or administer newly-added repositories. \n\\* `push` - team members can pull and push, but not administer newly-added repositories. \n\\* `admin` - team members can pull, push and administer newly-added repositories.",
"rawDescription": "**Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: \n\\* `pull` - team members can pull, but not push to or administer newly-added repositories. \n\\* `push` - team members can pull and push, but not administer newly-added repositories.",
"childParamsGroups": []
},
{

View File

@@ -26107,17 +26107,16 @@
},
"permission": {
"type": "string",
"description": "<p><strong>Deprecated</strong>. The permission that new repositories will be added to the team with when none is specified. Can be one of:<br>\n* <code>pull</code> - team members can pull, but not push to or administer newly-added repositories.<br>\n* <code>push</code> - team members can pull and push, but not administer newly-added repositories.<br>\n* <code>admin</code> - team members can pull, push and administer newly-added repositories.</p>",
"description": "<p><strong>Deprecated</strong>. The permission that new repositories will be added to the team with when none is specified. Can be one of:<br>\n* <code>pull</code> - team members can pull, but not push to or administer newly-added repositories.<br>\n* <code>push</code> - team members can pull and push, but not administer newly-added repositories.</p>",
"enum": [
"pull",
"push",
"admin"
"push"
],
"default": "pull",
"name": "permission",
"in": "body",
"rawType": "string",
"rawDescription": "**Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: \n\\* `pull` - team members can pull, but not push to or administer newly-added repositories. \n\\* `push` - team members can pull and push, but not administer newly-added repositories. \n\\* `admin` - team members can pull, push and administer newly-added repositories.",
"rawDescription": "**Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: \n\\* `pull` - team members can pull, but not push to or administer newly-added repositories. \n\\* `push` - team members can pull and push, but not administer newly-added repositories.",
"childParamsGroups": []
},
"parent_team_id": {
@@ -26146,7 +26145,7 @@
"example": {
"name": "Justice League",
"description": "A great team",
"permission": "admin",
"permission": "push",
"privacy": "closed"
}
}
@@ -26222,17 +26221,16 @@
},
{
"type": "string",
"description": "<p><strong>Deprecated</strong>. The permission that new repositories will be added to the team with when none is specified. Can be one of:<br>\n* <code>pull</code> - team members can pull, but not push to or administer newly-added repositories.<br>\n* <code>push</code> - team members can pull and push, but not administer newly-added repositories.<br>\n* <code>admin</code> - team members can pull, push and administer newly-added repositories.</p>",
"description": "<p><strong>Deprecated</strong>. The permission that new repositories will be added to the team with when none is specified. Can be one of:<br>\n* <code>pull</code> - team members can pull, but not push to or administer newly-added repositories.<br>\n* <code>push</code> - team members can pull and push, but not administer newly-added repositories.</p>",
"enum": [
"pull",
"push",
"admin"
"push"
],
"default": "pull",
"name": "permission",
"in": "body",
"rawType": "string",
"rawDescription": "**Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: \n\\* `pull` - team members can pull, but not push to or administer newly-added repositories. \n\\* `push` - team members can pull and push, but not administer newly-added repositories. \n\\* `admin` - team members can pull, push and administer newly-added repositories.",
"rawDescription": "**Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: \n\\* `pull` - team members can pull, but not push to or administer newly-added repositories. \n\\* `push` - team members can pull and push, but not administer newly-added repositories.",
"childParamsGroups": []
},
{

View File

@@ -19008,17 +19008,16 @@
},
"permission": {
"type": "string",
"description": "<p><strong>Deprecated</strong>. The permission that new repositories will be added to the team with when none is specified. Can be one of:<br>\n* <code>pull</code> - team members can pull, but not push to or administer newly-added repositories.<br>\n* <code>push</code> - team members can pull and push, but not administer newly-added repositories.<br>\n* <code>admin</code> - team members can pull, push and administer newly-added repositories.</p>",
"description": "<p><strong>Deprecated</strong>. The permission that new repositories will be added to the team with when none is specified. Can be one of:<br>\n* <code>pull</code> - team members can pull, but not push to or administer newly-added repositories.<br>\n* <code>push</code> - team members can pull and push, but not administer newly-added repositories.</p>",
"enum": [
"pull",
"push",
"admin"
"push"
],
"default": "pull",
"name": "permission",
"in": "body",
"rawType": "string",
"rawDescription": "**Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: \n\\* `pull` - team members can pull, but not push to or administer newly-added repositories. \n\\* `push` - team members can pull and push, but not administer newly-added repositories. \n\\* `admin` - team members can pull, push and administer newly-added repositories.",
"rawDescription": "**Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: \n\\* `pull` - team members can pull, but not push to or administer newly-added repositories. \n\\* `push` - team members can pull and push, but not administer newly-added repositories.",
"childParamsGroups": []
},
"parent_team_id": {
@@ -19038,7 +19037,7 @@
"example": {
"name": "Justice League",
"description": "A great team",
"permission": "admin",
"permission": "push",
"privacy": "closed"
}
}
@@ -19114,17 +19113,16 @@
},
{
"type": "string",
"description": "<p><strong>Deprecated</strong>. The permission that new repositories will be added to the team with when none is specified. Can be one of:<br>\n* <code>pull</code> - team members can pull, but not push to or administer newly-added repositories.<br>\n* <code>push</code> - team members can pull and push, but not administer newly-added repositories.<br>\n* <code>admin</code> - team members can pull, push and administer newly-added repositories.</p>",
"description": "<p><strong>Deprecated</strong>. The permission that new repositories will be added to the team with when none is specified. Can be one of:<br>\n* <code>pull</code> - team members can pull, but not push to or administer newly-added repositories.<br>\n* <code>push</code> - team members can pull and push, but not administer newly-added repositories.</p>",
"enum": [
"pull",
"push",
"admin"
"push"
],
"default": "pull",
"name": "permission",
"in": "body",
"rawType": "string",
"rawDescription": "**Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: \n\\* `pull` - team members can pull, but not push to or administer newly-added repositories. \n\\* `push` - team members can pull and push, but not administer newly-added repositories. \n\\* `admin` - team members can pull, push and administer newly-added repositories.",
"rawDescription": "**Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: \n\\* `pull` - team members can pull, but not push to or administer newly-added repositories. \n\\* `push` - team members can pull and push, but not administer newly-added repositories.",
"childParamsGroups": []
},
{

File diff suppressed because it is too large Load Diff

View File

@@ -82014,11 +82014,10 @@
},
"permission": {
"type": "string",
"description": "**Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: \n\\* `pull` - team members can pull, but not push to or administer newly-added repositories. \n\\* `push` - team members can pull and push, but not administer newly-added repositories. \n\\* `admin` - team members can pull, push and administer newly-added repositories.",
"description": "**Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: \n\\* `pull` - team members can pull, but not push to or administer newly-added repositories. \n\\* `push` - team members can pull and push, but not administer newly-added repositories.",
"enum": [
"pull",
"push",
"admin"
"push"
],
"default": "pull"
},
@@ -82038,7 +82037,7 @@
"example": {
"name": "Justice League",
"description": "A great team",
"permission": "admin",
"permission": "push",
"privacy": "closed"
}
}

View File

@@ -82039,11 +82039,10 @@
},
"permission": {
"type": "string",
"description": "**Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: \n\\* `pull` - team members can pull, but not push to or administer newly-added repositories. \n\\* `push` - team members can pull and push, but not administer newly-added repositories. \n\\* `admin` - team members can pull, push and administer newly-added repositories.",
"description": "**Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: \n\\* `pull` - team members can pull, but not push to or administer newly-added repositories. \n\\* `push` - team members can pull and push, but not administer newly-added repositories.",
"enum": [
"pull",
"push",
"admin"
"push"
],
"default": "pull"
},
@@ -82063,7 +82062,7 @@
"example": {
"name": "Justice League",
"description": "A great team",
"permission": "admin",
"permission": "push",
"privacy": "closed"
}
}

View File

@@ -83994,11 +83994,10 @@
},
"permission": {
"type": "string",
"description": "**Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: \n\\* `pull` - team members can pull, but not push to or administer newly-added repositories. \n\\* `push` - team members can pull and push, but not administer newly-added repositories. \n\\* `admin` - team members can pull, push and administer newly-added repositories.",
"description": "**Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: \n\\* `pull` - team members can pull, but not push to or administer newly-added repositories. \n\\* `push` - team members can pull and push, but not administer newly-added repositories.",
"enum": [
"pull",
"push",
"admin"
"push"
],
"default": "pull"
},
@@ -84018,7 +84017,7 @@
"example": {
"name": "Justice League",
"description": "A great team",
"permission": "admin",
"permission": "push",
"privacy": "closed"
}
}

View File

@@ -87063,11 +87063,10 @@
},
"permission": {
"type": "string",
"description": "**Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: \n\\* `pull` - team members can pull, but not push to or administer newly-added repositories. \n\\* `push` - team members can pull and push, but not administer newly-added repositories. \n\\* `admin` - team members can pull, push and administer newly-added repositories.",
"description": "**Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: \n\\* `pull` - team members can pull, but not push to or administer newly-added repositories. \n\\* `push` - team members can pull and push, but not administer newly-added repositories.",
"enum": [
"pull",
"push",
"admin"
"push"
],
"default": "pull"
},
@@ -87087,7 +87086,7 @@
"example": {
"name": "Justice League",
"description": "A great team",
"permission": "admin",
"permission": "push",
"privacy": "closed"
}
}

View File

@@ -59223,11 +59223,10 @@
},
"permission": {
"type": "string",
"description": "**Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: \n\\* `pull` - team members can pull, but not push to or administer newly-added repositories. \n\\* `push` - team members can pull and push, but not administer newly-added repositories. \n\\* `admin` - team members can pull, push and administer newly-added repositories.",
"description": "**Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: \n\\* `pull` - team members can pull, but not push to or administer newly-added repositories. \n\\* `push` - team members can pull and push, but not administer newly-added repositories.",
"enum": [
"pull",
"push",
"admin"
"push"
],
"default": "pull"
},
@@ -59243,7 +59242,7 @@
"example": {
"name": "Justice League",
"description": "A great team",
"permission": "admin",
"permission": "push",
"privacy": "closed"
}
}

View File

@@ -1,8 +1,11 @@
import { jest, describe, expect } from '@jest/globals'
import { dates, supported } from '../../lib/enterprise-server-releases.js'
import libLanguages from '../../lib/languages.js'
import { namePrefix } from '../../lib/search/config.js'
import { expect } from '@jest/globals'
import lunrIndexNames from '../../script/search/lunr-get-index-names.js'
import { get } from '../helpers/supertest.js'
const languageCodes = Object.keys(libLanguages)
describe('search', () => {
@@ -44,3 +47,49 @@ function getDate(date) {
const dateObj = date ? new Date(date) : new Date()
return dateObj.toISOString().slice(0, 10)
}
describe('search middleware', () => {
jest.setTimeout(60 * 1000)
test('basic search', async () => {
const sp = new URLSearchParams()
sp.set('query', 'stuff')
sp.set('language', 'en')
sp.set('version', 'dotcom')
const res = await get('/search?' + sp)
expect(res.statusCode).toBe(200)
const results = JSON.parse(res.text)
expect(Array.isArray(results)).toBeTruthy()
})
test('limit search', async () => {
const sp = new URLSearchParams()
sp.set('query', 'github') // will yield lots of results
sp.set('language', 'en')
sp.set('version', 'dotcom')
sp.set('limit', '1')
const res = await get('/search?' + sp)
expect(res.statusCode).toBe(200)
const results = JSON.parse(res.text)
expect(Array.isArray(results)).toBeTruthy()
expect(results.length).toBe(1)
})
test('invalid search version', async () => {
const sp = new URLSearchParams()
sp.set('query', 'stuff')
sp.set('language', 'en')
sp.set('version', 'NEVERHEARDOF')
const res = await get('/search?' + sp)
expect(res.statusCode).toBe(400)
})
test('invalid search language', async () => {
const sp = new URLSearchParams()
sp.set('query', 'stuff')
sp.set('language', 'NEVERHEARDOF')
sp.set('version', 'dotcom')
const res = await get('/search?' + sp)
expect(res.statusCode).toBe(400)
})
})