Skip to content

Commit c5494b6

Browse files
Merge branch 'main' into robertbrignull/credentials_in_app
2 parents 8e80106 + 407aa14 commit c5494b6

File tree

85 files changed

+844
-1524
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+844
-1524
lines changed

.github/actions/create-pr/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ runs:
7575
echo "Found existing open PR: $PR_NUMBERS"
7676
exit 0
7777
fi
78-
gh pr create --head "$HEAD_BRANCH" --base "$BASE_BRANCH" --title "$TITLE" --body "$BODY" --assignee ${{ github.actor }}
78+
gh pr create --head "$HEAD_BRANCH" --base "$BASE_BRANCH" --title "$TITLE" --body "$BODY" --assignee ${{ github.actor }} --draft
7979
if [[ $? -ne 0 ]]; then
8080
echo "Failed to create new PR."
8181
exit 1

.github/workflows/bump-cli.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,20 @@
11
name: Bump CLI version
22
on:
33
workflow_dispatch:
4+
inputs:
5+
option:
6+
description: "Option"
7+
required: true
8+
default: 'replace'
9+
type: choice
10+
options:
11+
- prepend
12+
- replace
13+
version:
14+
description: |
15+
The version to prepend to the supported versions file. This should be in the form: `vA.B.C`.
16+
required: false
17+
type: string
418
pull_request:
519
branches: [main]
620
paths:
@@ -23,10 +37,18 @@ jobs:
2337
with:
2438
fetch-depth: 1
2539
- name: Bump CLI
40+
if: ${{ inputs.option == 'replace' }}
2641
env:
2742
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2843
run: |
2944
scripts/replace-cli-version.sh
45+
- name: Prepend another version
46+
if: ${{ inputs.option == 'prepend' }}
47+
run: |
48+
cat extensions/ql-vscode/supported_cli_versions.json | jq '. |= ["${{ inputs.version }}"] + .' > supported_cli_versions_temp.json
49+
mv supported_cli_versions_temp.json extensions/ql-vscode/supported_cli_versions.json
50+
echo "LATEST_VERSION=${{ inputs.version }}" >> $GITHUB_ENV
51+
echo "PREVIOUS_VERSION=`jq -r '.[1]' extensions/ql-vscode/supported_cli_versions.json`" >> $GITHUB_ENV
3052
- name: Commit, Push and Open a PR
3153
uses: ./.github/actions/create-pr
3254
with:

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ jobs:
191191
uses: actions/checkout@v3
192192
- name: Set the variables
193193
id: set-variables
194-
run: echo "cli-versions=$(cat ./supported_cli_versions.json | jq -rc)" >> $GITHUB_OUTPUT
194+
run: echo "cli-versions=$(cat ./extensions/ql-vscode/supported_cli_versions.json | jq -rc)" >> $GITHUB_OUTPUT
195195
outputs:
196196
cli-versions: ${{ steps.set-variables.outputs.cli-versions }}
197197
cli-test:

extensions/ql-vscode/.prettierignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,9 @@
22
node_modules/
33
out/
44

5+
# This file gets written by an actions workflow.
6+
# Don't try to format it.
7+
supported_cli_versions.json
8+
59
# Include the Storybook config
610
!.storybook

extensions/ql-vscode/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## [UNRELEASED]
44

55
- Renamed command "CodeQL: Run Query" to "CodeQL: Run Query on Selected Dababase".
6+
- Remove support for CodeQL CLI versions older than 2.7.6. [#1788](https://github.com/github/vscode-codeql/pull/1788)
67

78
## 1.7.7 - 13 December 2022
89

extensions/ql-vscode/databases-schema.json

Lines changed: 1 addition & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -48,120 +48,14 @@
4848
},
4949
"required": ["repositoryLists", "owners", "repositories"],
5050
"additionalProperties": false
51-
},
52-
"local": {
53-
"type": "object",
54-
"properties": {
55-
"lists": {
56-
"type": "array",
57-
"items": {
58-
"type": "object",
59-
"properties": {
60-
"name": {
61-
"type": "string"
62-
},
63-
"databases": {
64-
"type": "array",
65-
"items": {
66-
"type": "object",
67-
"properties": {
68-
"name": {
69-
"type": "string",
70-
"minLength": 1
71-
},
72-
"dateAdded": {
73-
"type": "number"
74-
},
75-
"language": {
76-
"type": "string",
77-
"minLength": 1
78-
},
79-
"storagePath": {
80-
"type": "string",
81-
"minLength": 1
82-
}
83-
},
84-
"required": [
85-
"name",
86-
"dateAdded",
87-
"language",
88-
"storagePath"
89-
],
90-
"additionalProperties": false
91-
}
92-
}
93-
},
94-
"required": ["name", "databases"],
95-
"additionalProperties": false
96-
}
97-
},
98-
"databases": {
99-
"type": "array",
100-
"items": {
101-
"type": "object",
102-
"properties": {
103-
"name": {
104-
"type": "string",
105-
"minLength": 1
106-
},
107-
"dateAdded": {
108-
"type": "number"
109-
},
110-
"language": {
111-
"type": "string",
112-
"minLength": 1
113-
},
114-
"storagePath": {
115-
"type": "string",
116-
"minLength": 1
117-
}
118-
},
119-
"required": ["name", "dateAdded", "language", "storagePath"],
120-
"additionalProperties": false
121-
}
122-
}
123-
},
124-
"required": ["lists", "databases"],
125-
"additionalProperties": false
12651
}
12752
},
128-
"required": ["variantAnalysis", "local"],
53+
"required": ["variantAnalysis"],
12954
"additionalProperties": false
13055
},
13156
"selected": {
13257
"type": "object",
13358
"oneOf": [
134-
{
135-
"properties": {
136-
"kind": {
137-
"type": "string",
138-
"enum": ["localUserDefinedList"]
139-
},
140-
"listName": {
141-
"type": "string",
142-
"minLength": 1
143-
}
144-
},
145-
"required": ["kind", "listName"],
146-
"additionalProperties": false
147-
},
148-
{
149-
"properties": {
150-
"kind": {
151-
"type": "string",
152-
"enum": ["localDatabase"]
153-
},
154-
"databaseName": {
155-
"type": "string"
156-
},
157-
"listName": {
158-
"type": "string",
159-
"minLength": 1
160-
}
161-
},
162-
"required": ["kind", "databaseName"],
163-
"additionalProperties": false
164-
},
16559
{
16660
"properties": {
16761
"kind": {

extensions/ql-vscode/package.json

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -798,19 +798,23 @@
798798
"view/item/context": [
799799
{
800800
"command": "codeQLVariantAnalysisRepositories.removeItemContextMenu",
801-
"when": "view == codeQLVariantAnalysisRepositories && viewItem =~ /canBeRemoved/"
801+
"when": "view == codeQLVariantAnalysisRepositories && viewItem =~ /canBeRemoved/",
802+
"group": "2_qlContextMenu@3"
802803
},
803804
{
804805
"command": "codeQLVariantAnalysisRepositories.setSelectedItemContextMenu",
805-
"when": "view == codeQLVariantAnalysisRepositories && viewItem =~ /canBeSelected/"
806+
"when": "view == codeQLVariantAnalysisRepositories && viewItem =~ /canBeSelected/",
807+
"group": "1_qlContextMenu@1"
806808
},
807809
{
808810
"command": "codeQLVariantAnalysisRepositories.renameItemContextMenu",
809-
"when": "view == codeQLVariantAnalysisRepositories && viewItem =~ /canBeRenamed/"
811+
"when": "view == codeQLVariantAnalysisRepositories && viewItem =~ /canBeRenamed/",
812+
"group": "2_qlContextMenu@2"
810813
},
811814
{
812815
"command": "codeQLVariantAnalysisRepositories.openOnGitHubContextMenu",
813-
"when": "view == codeQLVariantAnalysisRepositories && viewItem =~ /canBeOpenedOnGitHub/"
816+
"when": "view == codeQLVariantAnalysisRepositories && viewItem =~ /canBeOpenedOnGitHub/",
817+
"group": "2_qlContextMenu@1"
814818
},
815819
{
816820
"command": "codeQLDatabases.setCurrentDatabase",
@@ -839,7 +843,7 @@
839843
},
840844
{
841845
"command": "codeQLVariantAnalysisRepositories.setSelectedItem",
842-
"when": "view == codeQLVariantAnalysisRepositories && viewItem =~ /canBeSelected/",
846+
"when": "view == codeQLVariantAnalysisRepositories && viewItem =~ /canBeSelected/ && false",
843847
"group": "inline"
844848
},
845849
{
@@ -1318,7 +1322,7 @@
13181322
},
13191323
{
13201324
"view": "codeQLQueryHistory",
1321-
"contents": "Run the 'CodeQL: Run Query on Selected Database' command on a QL query.\n[Run Query](command:codeQL.runQuery)"
1325+
"contents": "You have no query history items at the moment.\n\nSelect a database to run a CodeQL query and get your first results."
13221326
},
13231327
{
13241328
"view": "codeQLDatabases",

0 commit comments

Comments
 (0)