Skip to content

Commit 6e9ee65

Browse files
committed
fix: add tekton webhook to routes and remove unused field
1 parent 2d2c2e9 commit 6e9ee65

File tree

6 files changed

+5
-8
lines changed

6 files changed

+5
-8
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ resolver = "2"
88
[package]
99
name = "backend"
1010
description = "Backend API and services for StackClass"
11-
version = "0.41.0"
11+
version = "0.41.1"
1212
edition = "2024"
1313

1414
default-run = "stackclass-server"

openapi.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"license": {
77
"name": ""
88
},
9-
"version": "0.41.0"
9+
"version": "0.41.1"
1010
},
1111
"paths": {
1212
"/v1/courses": {

src/handler/webhook.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ pub async fn handle_tekton_webhook(
5252
State(ctx): State<Arc<Context>>,
5353
Json(event): Json<PipelineEvent>,
5454
) -> Result<impl IntoResponse> {
55-
info!("Received pipeline event for: {} - {}", event.course, event.repo);
55+
info!("Received pipeline event: {:?}", event);
5656

5757
// Verify HMAC signature to prevent request forgery
5858
let auth_secret = &ctx.config.auth_secret;

src/request/event.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
use chrono::{DateTime, Utc};
1615
use serde::{Deserialize, Serialize};
1716

1817
#[derive(Debug, Serialize, Deserialize, Clone)]
@@ -37,9 +36,6 @@ pub struct PipelineEvent {
3736

3837
/// Status of the tasks in the pipeline run
3938
pub tasks: Tasks,
40-
41-
/// Timestamp of when the event occurred
42-
pub timestamp: DateTime<Utc>,
4339
}
4440

4541
#[derive(Debug, Serialize, Deserialize, Clone)]

src/routes.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ pub fn build() -> Router<Arc<Context>> {
5555
)
5656
// Webhooks
5757
.route("/v1/webhooks/gitea", post(webhook::handle_gitea_webhook))
58+
.route("/v1/webhooks/tekton", post(webhook::handle_tekton_webhook))
5859
// Git Proxy
5960
.route("/{uuid}/{*path}", any(git::proxy))
6061
}

0 commit comments

Comments
 (0)