Skip to content

Commit a51b492

Browse files
not a conventional commit
Signed-off-by: Brooks Townsend <brooksmtownsend@gmail.com>
1 parent 2813552 commit a51b492

File tree

4 files changed

+37
-18
lines changed

4 files changed

+37
-18
lines changed

.github/workflows/check-conventional-commits.yml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
11
name: check-conventional-commits
22

3-
on: [pull_request]
3+
on: [pull_request_target]
44

55
permissions:
66
contents: read
77

88
jobs:
99
lint:
10+
if: ${{ github.repository == 'wasmCloud/wasmCloud' }}
1011
runs-on: ubuntu-latest
1112
permissions:
1213
pull-requests: write
1314
steps:
15+
- id: app-token
16+
uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1.11.0
17+
with:
18+
app-id: ${{ secrets.BOT_APP_ID }}
19+
private-key: ${{ secrets.BOT_APP_PRIVATE_KEY }}
1420
- name: Action Meta
1521
id: meta
1622
run: |
@@ -106,6 +112,7 @@ jobs:
106112
recreate: true
107113
hide_and_recreate: true
108114
path: ./conventional-commit.md
115+
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
109116

110117
- name: Hide PR Comment
111118
# If the workflow is now successful, we can resolve the original comment
@@ -116,17 +123,21 @@ jobs:
116123
header: tip-conventional-commits
117124
hide: true
118125
hide_classify: 'RESOLVED'
126+
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
119127

120128
label-pr:
129+
if: ${{ github.repository == 'wasmCloud/wasmCloud' }}
121130
needs: lint
122131
runs-on: ubuntu-latest
123132
permissions:
124133
contents: read
125134
pull-requests: write
126135
steps:
127-
- name: Checkout repository
128-
uses: actions/checkout@v4
129-
136+
- id: app-token
137+
uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1.11.0
138+
with:
139+
app-id: ${{ secrets.BOT_APP_ID }}
140+
private-key: ${{ secrets.BOT_APP_PRIVATE_KEY }}
130141
- name: Get pull request commits
131142
id: get_commits
132143
run: |
@@ -135,7 +146,7 @@ jobs:
135146
echo "$PR_COMMITS" >> $GITHUB_ENV
136147
echo "EOF" >> $GITHUB_ENV
137148
env:
138-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
149+
GH_TOKEN: ${{ steps.app-token.outputs.token }}
139150

140151
- name: Parse commit messages and determine labels
141152
id: parse_labels
@@ -173,4 +184,4 @@ jobs:
173184
gh pr edit ${{ github.event.pull_request.number }} --add-label "$label"
174185
done
175186
env:
176-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
187+
GH_TOKEN: ${{ steps.app-token.outputs.token }}

Cargo.lock

Lines changed: 12 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ opt-level = "z"
122122
lto = true
123123

124124
[dependencies]
125-
wasmcloud-provider-wadm = { workspace = true, optional = true }
126125
anyhow = { workspace = true }
127126
clap = { workspace = true, features = [
128127
"color",
@@ -137,9 +136,11 @@ clap = { workspace = true, features = [
137136
clap-markdown = { workspace = true, optional = true }
138137
nkeys = { workspace = true, optional = true }
139138
regex = { workspace = true, optional = true }
139+
schemars = { workspace = true, features = ["derive", "time", "url"] }
140140
tokio = { workspace = true, features = ["macros", "rt-multi-thread", "signal"] }
141141
tracing = { workspace = true } # TODO: revisit the 'release_max_level_info' feature https://github.com/wasmCloud/wasmCloud/issues/468
142142
tracing-subscriber = { workspace = true, optional = true }
143+
utoipa = { workspace = true, features = ["macros"] }
143144
wascap = { workspace = true, optional = true }
144145
wasmcloud-core = { workspace = true, features = ["otel"], optional = true }
145146
wasmcloud-host = { workspace = true, optional = true }
@@ -154,6 +155,7 @@ wasmcloud-provider-keyvalue-vault = { workspace = true, optional = true }
154155
wasmcloud-provider-messaging-kafka = { workspace = true, optional = true }
155156
wasmcloud-provider-messaging-nats = { workspace = true, optional = true }
156157
wasmcloud-provider-sqldb-postgres = { workspace = true, optional = true }
158+
wasmcloud-provider-wadm = { workspace = true, optional = true }
157159
wasmcloud-tracing = { workspace = true, features = ["otel"], optional = true }
158160

159161
[dev-dependencies]
@@ -299,6 +301,7 @@ rustls-native-certs = { version = "0.8", default-features = false }
299301
rustls-pemfile = { version = "2", default-features = false }
300302
rustversion = { version = "1.0", default-features = false }
301303
sanitize-filename = { version = "0.4", default-features = false }
304+
schemars = { version = "0.8", default-features = false }
302305
secrecy = { version = "0.8", default-features = false }
303306
secrets-nats-kv = { version = "0.1", path = "crates/secrets-nats-kv", default-features = false }
304307
semver = { version = "1", default-features = false }
@@ -342,6 +345,7 @@ unicase = { version = "2.8.1", default-features = false }
342345
# see: https://github.com/servo/rust-url/pull/831
343346
url = { version = "2" }
344347
uuid = { version = "1", default-features = false }
348+
utoipa = { version = "5.3", default-features = false }
345349
vaultrs = { version = "0.7", default-features = false }
346350
wadm = { version = "0.20", default-features = false }
347351
wadm-client = { version = "0.8.0", default-features = false }

src/main.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@ use anyhow::{bail, Context};
1010
use clap::{ArgAction, Parser};
1111
use nkeys::KeyPair;
1212
use regex::Regex;
13+
use schemars::JsonSchema;
1314
use tokio::time::{timeout, timeout_at};
1415
use tokio::{select, signal};
1516
use tracing::{warn, Level as TracingLogLevel};
1617
use tracing_subscriber::util::SubscriberInitExt as _;
18+
use utoipa::ToSchema;
1719
use wasmcloud_core::logging::Level as WasmcloudLogLevel;
1820
use wasmcloud_core::{OtelConfig, OtelProtocol};
1921
use wasmcloud_host::oci::Config as OciConfig;
@@ -23,7 +25,7 @@ use wasmcloud_host::wasmbus::Features;
2325
use wasmcloud_host::WasmbusHostConfig;
2426
use wasmcloud_tracing::configure_observability;
2527

26-
#[derive(Debug, Parser)]
28+
#[derive(Debug, Parser, ToSchema, JsonSchema)]
2729
#[allow(clippy::struct_excessive_bools)]
2830
#[clap(name = "wasmcloud")]
2931
#[command(version, about, long_about = None)]

0 commit comments

Comments
 (0)