This commit is contained in:
SnskArora 2025-03-22 14:21:34 +05:30
parent ef4dddd64b
commit 2e656c1651
No known key found for this signature in database
GPG key ID: 6EC7FEA48093AB59
5 changed files with 11 additions and 5 deletions

View file

@ -5,7 +5,7 @@ RUN go mod tidy
RUN CGO_ENABLED=0 go build -o app .
FROM alpine:3.14
LABEL org.opencontainers.image.source https://github.com/trstringer/manual-approval
LABEL org.opencontainers.image.source https://github.com/snskArora/manual-approval
RUN apk update && apk add ca-certificates
COPY --from=builder /var/app/app /var/app/app
CMD ["/var/app/app"]

View file

@ -1,5 +1,5 @@
IMAGE_REPO=ghcr.io/trstringer/manual-approval
TARGET_PLATFORM=linux/amd64
IMAGE_REPO ?= ghcr.io/snskArora/manual-approval
TARGET_PLATFORM ?= linux/amd64
.PHONY: tidy
tidy:

View file

@ -50,4 +50,4 @@ outputs:
description: The status of the approval ("approved" or "denied")
runs:
using: docker
image: docker://ghcr.io/trstringer/manual-approval:1.9.1
image: docker://ghcr.io/sunny-1651/manual-approval:latest

View file

@ -109,6 +109,12 @@ func (a *approvalEnvironment) createApprovalIssue(ctx context.Context) error {
}
a.approvalIssueNumber = a.approvalIssue.GetNumber()
// Now add a comment to the same issue
commentBody := "This is a comment on the issue."
_, _, err = a.client.Issues.CreateComment(ctx, a.targetRepoOwner, a.targetRepoName, *a.approvalIssue.Number, &github.IssueComment{
Body: &commentBody,
})
fmt.Printf("Issue created: %s\n", a.approvalIssue.GetHTMLURL())
return nil
}

2
go.mod
View file

@ -1,4 +1,4 @@
module github.com/trstringer/manual-approval
module github.com/snskArora/manual-approval
go 1.17