Skip to content

Commit

Permalink
[FIX: #39152] Public links refer to null when question is new (#39154)
Browse files Browse the repository at this point in the history
  • Loading branch information
oisincoveney committed Mar 12, 2024
1 parent 8d29e36 commit 1a82745
Show file tree
Hide file tree
Showing 362 changed files with 7,063 additions and 4,402 deletions.
1 change: 1 addition & 0 deletions .clj-kondo/hooks/metabase/models/setting.clj
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
metabot-prompt-generator-token-limit
multi-setting-read-only
notification-link-base-url
no-surveys
num-metabot-choices
openai-api-key
openai-available-models
Expand Down
17 changes: 4 additions & 13 deletions .github/team.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,12 @@
{
"name": "Embedding",
"label": ".Team/Embedding",
"members": [
"WiNloSt",
"deniskaber",
"oisincoveney",
"npretto"
]
"members": ["WiNloSt", "deniskaber", "oisincoveney", "npretto"]
},
{
"name": "BEC",
"label": ".Team/BackendComponents",
"projectUrl": "https://github.com/orgs/metabase/projects/50/views/1",
"members": [
"tsmacdonald",
"qnkhuat",
Expand All @@ -36,13 +32,8 @@
{
"name": "Query Processor",
"label": ".Team/QueryProcessor",
"members": [
"camsaul",
"snoe",
"bshepherdson",
"metamben",
"lbrdnk"
]
"projectUrl": "https://github.com/orgs/metabase/projects/50/views/1",
"members": ["camsaul", "snoe", "bshepherdson", "metamben", "lbrdnk"]
},
{
"name": "Admin Webapp",
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/auto-assign.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
const prNumber = context.payload.pull_request.number;
if (prAuthor.endsWith('[bot]')) {
return false;
return null;
}
// Assign PR author
Expand All @@ -44,7 +44,7 @@ jobs:
const team = teamConfig.teams.find(t => t.members.includes(prAuthor));
if (!team) {
console.log('You are not assigned to any team. If you need one, update .github/team.json');
return false;
return null;
}
try {
Expand All @@ -55,7 +55,7 @@ jobs:
});
} catch (e) {
console.log(`The label ${team.label} does not exist, create it first`);
return false;
return null;
}
// Add team label
Expand All @@ -66,9 +66,9 @@ jobs:
labels: [team.label]
});
return true;
return team.projectUrl || null;
- uses: actions/add-to-project@v0.5.0
if: ${{ fromJSON(steps.auto-assign.outputs.result) }}
if: ${{ steps.auto-assign.outputs.result != 'null' }}
with:
project-url: https://github.com/orgs/metabase/projects/50/views/1
project-url: ${{ steps.auto-assign.outputs.result }}
github-token: ${{ steps.generate-token.outputs.token }}
2 changes: 1 addition & 1 deletion .lsp/config.edn
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
:show-docs-arity-on-same-line? true
:project-specs [{:project-path "deps.edn"
:classpath-cmd ["clojure"
"-A:dev:ee:ee-dev:drivers:drivers-dev:build:build/release:build/all"
"-A:dev:ee:ee-dev:drivers:drivers-dev:build:build/all"
"-Spath"]}]
:clean {:ns-inner-blocks-indentation :keep}
:linters {:clojure-lsp/unused-public-var {:level :warning
Expand Down
4 changes: 0 additions & 4 deletions backport.sh

This file was deleted.

8 changes: 5 additions & 3 deletions deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,9 @@
lambdaisland/uri {:mvn/version "1.19.155"} ; Used by openai-clojure
medley/medley {:mvn/version "1.4.0"} ; lightweight lib of useful functions
metabase/connection-pool {:mvn/version "1.2.0"} ; simple wrapper around C3P0. JDBC connection pools
metabase/saml20-clj {:mvn/version "2.2.4" ; EE SAML integration.
:exclusions [org.bouncycastle/bcpkix-jdk15on
metabase/saml20-clj {:mvn/version "2.2.7.170"
:exclusions [ ; EE SAML integration TODO: bump version when we release the library
org.bouncycastle/bcpkix-jdk15on
org.bouncycastle/bcprov-jdk15on
org.bouncycastle/bcpkix-jdk18on
org.bouncycastle/bcprov-jdk18on]}
Expand Down Expand Up @@ -131,7 +132,7 @@
org.clj-commons/hickory {:mvn/version "0.7.3" ; Parse HTML into Clojure data structures
:exclusions [org.jsoup/jsoup]}
org.clojars.pntblnk/clj-ldap {:mvn/version "0.0.17"} ; LDAP client
org.clojure/clojure {:mvn/version "1.11.1"}
org.clojure/clojure {:mvn/version "1.11.2"}
org.clojure/core.async {:mvn/version "1.6.681"
:exclusions [org.clojure/tools.reader]}
org.clojure/core.logic {:mvn/version "1.0.1"} ; optimized pattern matching library for Clojure
Expand Down Expand Up @@ -237,6 +238,7 @@
jonase/eastwood {:mvn/version "1.4.2" ; inspects namespaces and reports possible problems using tools.analyzer
:exclusions
[org.ow2.asm/asm-all]}
criterium/criterium {:mvn/version "0.4.6"} ; benchmarking library
lambdaisland/deep-diff2 {:mvn/version "2.10.211"} ; way better diffs
methodical/methodical {:mvn/version "0.15.1"} ; drop-in replacements for Clojure multimethods and adds several advanced features
org.clojure/algo.generic {:mvn/version "0.1.3"}
Expand Down
52 changes: 26 additions & 26 deletions docs/api/action.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ summary: |

### PARAMS:

* **`action-id`** value must be an integer greater than zero.
- **`action-id`** value must be an integer greater than zero.

## `DELETE /api/action/:id/public_link`

Delete the publicly-accessible link to this Dashboard.

### PARAMS:

* **`id`** value must be an integer greater than zero.
- **`id`** value must be an integer greater than zero.

## `GET /api/action/`

Expand All @@ -29,23 +29,23 @@ Returns actions that can be used for QueryActions. By default lists all viewable

### PARAMS:

* **`model-id`** nullable value must be an integer greater than zero.
- **`model-id`** nullable value must be an integer greater than zero.

## `GET /api/action/:action-id`

### PARAMS:

* **`action-id`** value must be an integer greater than zero.
- **`action-id`** value must be an integer greater than zero.

## `GET /api/action/:action-id/execute`

Fetches the values for filling in execution parameters. Pass PK parameters and values to select.

### PARAMS:

* **`action-id`** value must be an integer greater than zero.
- **`action-id`** value must be an integer greater than zero.

* **`parameters`** value must be a valid JSON string.
- **`parameters`** value must be a valid JSON string.

## `GET /api/action/public`

Expand All @@ -57,33 +57,33 @@ Create a new action.

### PARAMS:

* **`visualization_settings`** nullable map
- **`visualization_settings`** nullable map.

* **`parameters`** nullable sequence of map
- **`parameters`** nullable sequence of map.

* **`description`** nullable string
- **`description`** nullable string.

* **`error_handle`** nullable string, and must be a valid json-query, something like '.item.title'
- **`error_handle`** nullable string, and must be a valid json-query, something like '.item.title'.

* **`database_id`** nullable value must be an integer greater than zero.
- **`database_id`** nullable value must be an integer greater than zero.

* **`name`** string
- **`name`** string.

* **`response_handle`** nullable string, and must be a valid json-query, something like '.item.title'
- **`response_handle`** nullable string, and must be a valid json-query, something like '.item.title'.

* **`template`** nullable map where {:method -> <enum of GET, POST, PUT, DELETE, PATCH>, :url -> <string with length >= 1>, :body (optional) -> <nullable string>, :headers (optional) -> <nullable string>, :parameters (optional) -> <nullable sequence of map>, :parameter_mappings (optional) -> <nullable map>} with no other keys
- **`template`** nullable map where {:method -> <enum of GET, POST, PUT, DELETE, PATCH>, :url -> <string with length >= 1>, :body (optional) -> <nullable string>, :headers (optional) -> <nullable string>, :parameters (optional) -> <nullable sequence of map>, :parameter_mappings (optional) -> <nullable map>} with no other keys.

* **`type`** nullable Unsupported action type
- **`type`** nullable Unsupported action type.

* **`dataset_query`** nullable map
- **`dataset_query`** nullable map.

* **`model_id`** value must be an integer greater than zero.
- **`model_id`** value must be an integer greater than zero.

* **`kind`** nullable Unsupported implicit action kind
- **`kind`** nullable Unsupported implicit action kind.

* **`parameter_mappings`** nullable map
- **`parameter_mappings`** nullable map.

* **`action`**
- **`action`**

## `POST /api/action/:id/execute`

Expand All @@ -93,11 +93,11 @@ Execute the Action.

### PARAMS:

* **`id`** value must be an integer greater than zero.
- **`id`** value must be an integer greater than zero.

* **`parameters`** nullable map from <keyword> to <anything>
- **`parameters`** nullable map from <keyword> to <anything>.

* **`_body`**
- **`_body`**

## `POST /api/action/:id/public_link`

Expand All @@ -109,15 +109,15 @@ You must be a superuser to do this.

### PARAMS:

* **`id`** value must be an integer greater than zero.
- **`id`** value must be an integer greater than zero.

## `PUT /api/action/:id`

### PARAMS:

* **`id`** value must be an integer greater than zero.
- **`id`** value must be an integer greater than zero.

* **`action`** map where {:archived (optional) -> <nullable boolean>, :database_id (optional) -> <nullable value must be an integer greater than zero.>, :dataset_query (optional) -> <nullable map>, :description (optional) -> <nullable string>, :error_handle (optional) -> <nullable string, and must be a valid json-query, something like '.item.title'>, :kind (optional) -> <nullable Unsupported implicit action kind>, :model_id (optional) -> <nullable value must be an integer greater than zero.>, :name (optional) -> <nullable string>, :parameter_mappings (optional) -> <nullable map>, :parameters (optional) -> <nullable sequence of map>, :response_handle (optional) -> <nullable string, and must be a valid json-query, something like '.item.title'>, :template (optional) -> <nullable map where {:method -> <enum of GET, POST, PUT, DELETE, PATCH>, :url -> <string with length >= 1>, :body (optional) -> <nullable string>, :headers (optional) -> <nullable string>, :parameters (optional) -> <nullable sequence of map>, :parameter_mappings (optional) -> <nullable map>} with no other keys>, :type (optional) -> <nullable Unsupported action type>, :visualization_settings (optional) -> <nullable map>}
- **`action`** map where {:archived (optional) -> <nullable boolean>, :database_id (optional) -> <nullable value must be an integer greater than zero.>, :dataset_query (optional) -> <nullable map>, :description (optional) -> <nullable string>, :error_handle (optional) -> <nullable string, and must be a valid json-query, something like '.item.title'>, :kind (optional) -> <nullable Unsupported implicit action kind>, :model_id (optional) -> <nullable value must be an integer greater than zero.>, :name (optional) -> <nullable string>, :parameter_mappings (optional) -> <nullable map>, :parameters (optional) -> <nullable sequence of map>, :response_handle (optional) -> <nullable string, and must be a valid json-query, something like '.item.title'>, :template (optional) -> <nullable map where {:method -> <enum of GET, POST, PUT, DELETE, PATCH>, :url -> <string with length >= 1>, :body (optional) -> <nullable string>, :headers (optional) -> <nullable string>, :parameters (optional) -> <nullable sequence of map>, :parameter_mappings (optional) -> <nullable map>} with no other keys>, :type (optional) -> <nullable Unsupported action type>, :visualization_settings (optional) -> <nullable map>}.

---

Expand Down
40 changes: 20 additions & 20 deletions docs/api/alert.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ For users to unsubscribe themselves from the given alert.

### PARAMS:

* **`id`** value must be an integer greater than zero.
- **`id`** value must be an integer greater than zero.

## `GET /api/alert/`

Expand All @@ -23,67 +23,67 @@ Fetch alerts which the current user has created or will receive, or all alerts i

### PARAMS:

* **`archived`** nullable value must be a valid boolean string ('true' or 'false').
- **`archived`** nullable value must be a valid boolean string ('true' or 'false').

* **`user_id`** nullable value must be an integer greater than zero.
- **`user_id`** nullable value must be an integer greater than zero.

## `GET /api/alert/:id`

Fetch an alert by ID.

### PARAMS:

* **`id`** value must be an integer greater than zero.
- **`id`** value must be an integer greater than zero.

## `GET /api/alert/question/:id`

Fetch all alerts for the given question (`Card`) id.

### PARAMS:

* **`id`** nullable value must be an integer greater than zero.
- **`id`** nullable value must be an integer greater than zero.

* **`archived`** nullable value must be a valid boolean string ('true' or 'false').
- **`archived`** nullable value must be a valid boolean string ('true' or 'false').

## `POST /api/alert/`

Create a new Alert.

### PARAMS:

* **`alert_condition`** enum of rows, goal
- **`alert_condition`** enum of rows, goal.

* **`card`** value must be a map with the keys `id`, `include_csv`, `include_xls`, and `dashboard_card_id`.
- **`card`** value must be a map with the keys `id`, `include_csv`, `include_xls`, and `dashboard_card_id`.

* **`channels`** one or more map
- **`channels`** one or more map.

* **`alert_first_only`** boolean
- **`alert_first_only`** boolean.

* **`alert_above_goal`** nullable boolean
- **`alert_above_goal`** nullable boolean.

* **`new-alert-request-body`**
- **`new-alert-request-body`**

## `PUT /api/alert/:id`

Update a `Alert` with ID.

### PARAMS:

* **`id`** value must be an integer greater than zero.
- **`id`** value must be an integer greater than zero.

* **`alert_condition`** nullable enum of rows, goal
- **`alert_condition`** nullable enum of rows, goal.

* **`alert_first_only`** nullable boolean
- **`alert_first_only`** nullable boolean.

* **`alert_above_goal`** nullable boolean
- **`alert_above_goal`** nullable boolean.

* **`card`** nullable value must be a map with the keys `id`, `include_csv`, `include_xls`, and `dashboard_card_id`.
- **`card`** nullable value must be a map with the keys `id`, `include_csv`, `include_xls`, and `dashboard_card_id`.

* **`channels`** nullable one or more map
- **`channels`** nullable one or more map.

* **`archived`** nullable boolean
- **`archived`** nullable boolean.

* **`alert-updates`**
- **`alert-updates`**

---

Expand Down

0 comments on commit 1a82745

Please sign in to comment.