mirror of
https://github.com/matrix-org/matrix-hookshot.git
synced 2025-03-10 21:19:13 +00:00
parent
43176adf7a
commit
01159fa0d1
1
changelog.d/728.misc
Normal file
1
changelog.d/728.misc
Normal file
@ -0,0 +1 @@
|
||||
Update `yaml` dependency to `2.2.2`
|
@ -2,7 +2,7 @@
|
||||
|
||||
bridge:
|
||||
# Basic homeserver configuration
|
||||
#
|
||||
|
||||
domain: example.com
|
||||
url: http://localhost:8008
|
||||
mediaUrl: https://example.com
|
||||
@ -10,35 +10,35 @@ bridge:
|
||||
bindAddress: 127.0.0.1
|
||||
github:
|
||||
# (Optional) Configure this to enable GitHub support
|
||||
#
|
||||
|
||||
auth:
|
||||
# Authentication for the GitHub App.
|
||||
#
|
||||
|
||||
id: 123
|
||||
privateKeyFile: github-key.pem
|
||||
webhook:
|
||||
# Webhook settings for the GitHub app.
|
||||
#
|
||||
|
||||
secret: secrettoken
|
||||
oauth:
|
||||
# (Optional) Settings for allowing users to sign in via OAuth.
|
||||
#
|
||||
|
||||
client_id: foo
|
||||
client_secret: bar
|
||||
redirect_uri: https://example.com/bridge_oauth/
|
||||
defaultOptions:
|
||||
# (Optional) Default options for GitHub connections.
|
||||
#
|
||||
|
||||
showIssueRoomLink: false
|
||||
hotlinkIssues:
|
||||
prefix: "#"
|
||||
userIdPrefix:
|
||||
# (Optional) Prefix used when creating ghost users for GitHub accounts.
|
||||
#
|
||||
|
||||
_github_
|
||||
gitlab:
|
||||
# (Optional) Configure this to enable GitLab support
|
||||
#
|
||||
|
||||
instances:
|
||||
gitlab.com:
|
||||
url: https://gitlab.com
|
||||
@ -47,11 +47,11 @@ gitlab:
|
||||
publicUrl: https://example.com/hookshot/
|
||||
userIdPrefix:
|
||||
# (Optional) Prefix used when creating ghost users for GitLab accounts.
|
||||
#
|
||||
|
||||
_gitlab_
|
||||
figma:
|
||||
# (Optional) Configure this to enable Figma support
|
||||
#
|
||||
|
||||
publicUrl: https://example.com/hookshot/
|
||||
instances:
|
||||
your-instance:
|
||||
@ -60,22 +60,22 @@ figma:
|
||||
passcode: your-webhook-passcode
|
||||
jira:
|
||||
# (Optional) Configure this to enable Jira support. Only specify `url` if you are using a On Premise install (i.e. not atlassian.com)
|
||||
#
|
||||
|
||||
webhook:
|
||||
# Webhook settings for JIRA
|
||||
#
|
||||
|
||||
secret: secrettoken
|
||||
oauth:
|
||||
# (Optional) OAuth settings for connecting users to JIRA. See documentation for more information
|
||||
#
|
||||
|
||||
client_id: foo
|
||||
client_secret: bar
|
||||
redirect_uri: https://example.com/bridge_oauth/
|
||||
generic:
|
||||
# (Optional) Support for generic webhook events.
|
||||
#'allowJsTransformationFunctions' will allow users to write short transformation snippets in code, and thus is unsafe in untrusted environments
|
||||
#
|
||||
#
|
||||
|
||||
|
||||
enabled: false
|
||||
enableHttpGet: false
|
||||
urlPrefix: https://example.com/webhook/
|
||||
@ -84,27 +84,27 @@ generic:
|
||||
waitForComplete: false
|
||||
feeds:
|
||||
# (Optional) Configure this to enable RSS/Atom feed support
|
||||
#
|
||||
|
||||
enabled: false
|
||||
pollIntervalSeconds: 600
|
||||
pollTimeoutSeconds: 30
|
||||
provisioning:
|
||||
# (Optional) Provisioning API for integration managers
|
||||
#
|
||||
|
||||
secret: "!secretToken"
|
||||
passFile:
|
||||
# A passkey used to encrypt tokens stored inside the bridge.
|
||||
# Run openssl genpkey -out passkey.pem -outform PEM -algorithm RSA -pkeyopt rsa_keygen_bits:4096 to generate
|
||||
#
|
||||
|
||||
passkey.pem
|
||||
bot:
|
||||
# (Optional) Define profile information for the bot user
|
||||
#
|
||||
|
||||
displayname: Hookshot Bot
|
||||
avatar: mxc://half-shot.uk/2876e89ccade4cb615e210c458e2a7a6883fe17d
|
||||
serviceBots:
|
||||
# (Optional) Define additional bot users for specific services
|
||||
#
|
||||
|
||||
- localpart: feeds
|
||||
displayname: Feeds
|
||||
avatar: mxc://half-shot.uk/2876e89ccade4cb615e210c458e2a7a6883fe17d
|
||||
@ -112,25 +112,25 @@ serviceBots:
|
||||
service: feeds
|
||||
metrics:
|
||||
# (Optional) Prometheus metrics support
|
||||
#
|
||||
|
||||
enabled: true
|
||||
queue:
|
||||
# (Optional) Message queue / cache configuration options for large scale deployments.
|
||||
# For encryption to work, must be set to monolithic mode and have a host & port specified.
|
||||
#
|
||||
|
||||
monolithic: true
|
||||
port: 6379
|
||||
host: localhost
|
||||
logging:
|
||||
# (Optional) Logging settings. You can have a severity debug,info,warn,error
|
||||
#
|
||||
|
||||
level: info
|
||||
colorize: true
|
||||
json: false
|
||||
timestampFormat: HH:mm:ss:SSS
|
||||
widgets:
|
||||
# (Optional) EXPERIMENTAL support for complimentary widgets
|
||||
#
|
||||
|
||||
addToAdminRooms: false
|
||||
disallowedIpRanges:
|
||||
- 127.0.0.0/8
|
||||
@ -159,7 +159,7 @@ widgets:
|
||||
widgetTitle: Hookshot Configuration
|
||||
permissions:
|
||||
# (Optional) Permissions for using the bridge. See docs/setup.md#permissions for help
|
||||
#
|
||||
|
||||
- actor: example.com
|
||||
services:
|
||||
- service: "*"
|
||||
@ -170,7 +170,7 @@ listeners:
|
||||
# 'port' must be specified. Each listener must listen on a unique port.
|
||||
# 'bindAddress' will default to '127.0.0.1' if not specified, which may not be suited to Docker environments.
|
||||
# 'resources' may be any of webhooks, widgets, metrics, provisioning
|
||||
#
|
||||
|
||||
- port: 9000
|
||||
bindAddress: 0.0.0.0
|
||||
resources:
|
||||
|
@ -71,7 +71,7 @@
|
||||
"vm2": "^3.9.17",
|
||||
"winston": "^3.3.3",
|
||||
"xml2js": "^0.5.0",
|
||||
"yaml": "^1.10.2"
|
||||
"yaml": "^2.2.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@codemirror/lang-javascript": "^6.0.2",
|
||||
|
@ -1,7 +1,6 @@
|
||||
import { BridgeConfig, BridgeConfigRoot } from "./Config";
|
||||
import YAML from "yaml";
|
||||
import { getConfigKeyMetadata, keyIsHidden } from "./Decorators";
|
||||
import { Node, YAMLSeq } from "yaml/types";
|
||||
import { Node, YAMLSeq, default as YAML } from "yaml";
|
||||
import { randomBytes } from "crypto";
|
||||
import { DefaultDisallowedIpRanges } from "matrix-appservice-bridge";
|
||||
|
||||
@ -164,15 +163,15 @@ function renderSection(doc: YAML.Document, obj: Record<string, unknown>, parentN
|
||||
|
||||
let newNode: Node;
|
||||
if (typeof value === "object" && !Array.isArray(value)) {
|
||||
newNode = YAML.createNode({});
|
||||
newNode = doc.createNode({});
|
||||
renderSection(doc, value as Record<string, unknown>, newNode as YAMLSeq);
|
||||
} else if (typeof value === "function") {
|
||||
if (value.length !== 0) {
|
||||
throw Error("Only zero-argument functions are allowed as config values");
|
||||
}
|
||||
newNode = YAML.createNode(value());
|
||||
newNode = doc.createNode(value());
|
||||
} else {
|
||||
newNode = YAML.createNode(value);
|
||||
newNode = doc.createNode(value);
|
||||
}
|
||||
|
||||
const metadata = getConfigKeyMetadata(obj, key);
|
||||
@ -190,7 +189,7 @@ function renderSection(doc: YAML.Document, obj: Record<string, unknown>, parentN
|
||||
|
||||
function renderDefaultConfig() {
|
||||
const doc = new YAML.Document();
|
||||
doc.contents = YAML.createNode({});
|
||||
doc.contents = doc.createNode({});
|
||||
doc.commentBefore = ' This is an example configuration file';
|
||||
// Needed because the entries syntax below would not work otherwise
|
||||
renderSection(doc, DefaultConfig as unknown as Record<string, unknown>);
|
||||
|
@ -6243,10 +6243,10 @@ yallist@^4.0.0:
|
||||
resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72"
|
||||
integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==
|
||||
|
||||
yaml@^1.10.2:
|
||||
version "1.10.2"
|
||||
resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b"
|
||||
integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==
|
||||
yaml@^2.2.2:
|
||||
version "2.2.2"
|
||||
resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.2.2.tgz#ec551ef37326e6d42872dad1970300f8eb83a073"
|
||||
integrity sha512-CBKFWExMn46Foo4cldiChEzn7S7SRV+wqiluAb6xmueD/fGyRHIhX8m14vVGgeFWjN540nKCNVj6P21eQjgTuA==
|
||||
|
||||
yargs-parser@20.2.4:
|
||||
version "20.2.4"
|
||||
|
Loading…
x
Reference in New Issue
Block a user