From e567e152dc0ab0ce0368daa62a7afcf605c4adac Mon Sep 17 00:00:00 2001 From: michaeljguarino Date: Thu, 22 Feb 2024 00:14:19 -0500 Subject: [PATCH 1/2] Fix issue w/ solo create pr automations This currently segfaults on a nil-pointer deref. Fix here. --- .github/CODEOWNERS | 2 +- pkg/pr/updates.go | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 8027f6751..30ca44234 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1 @@ -* @michaeljguarino @DavidSpek @zreigz +* @michaeljguarino @zreigz @floreks @maciaszczykm diff --git a/pkg/pr/updates.go b/pkg/pr/updates.go index c1963af2d..3702d8178 100644 --- a/pkg/pr/updates.go +++ b/pkg/pr/updates.go @@ -7,6 +7,10 @@ import ( ) func applyUpdates(updates *UpdateSpec, ctx map[string]interface{}) error { + if updates == nil { + return nil + } + replacement, err := templateReplacement([]byte(updates.ReplaceTemplate), ctx) if err != nil { return err From 040a0812cac482422be9cd34093665004d0d8d49 Mon Sep 17 00:00:00 2001 From: michaeljguarino Date: Thu, 22 Feb 2024 00:48:16 -0500 Subject: [PATCH 2/2] fix dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index d58485228..063eeba3e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ FROM ubuntu:22.10 as user # Create a nonroot user for final image RUN useradd -u 10001 nonroot -FROM golang:1.20-alpine3.17 AS builder +FROM golang:1.22-alpine3.19 AS builder WORKDIR /workspace