diff --git a/Dockerfile b/Dockerfile index da0f22e..786dca6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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"] diff --git a/Makefile b/Makefile index 56ba8bc..7491010 100644 --- a/Makefile +++ b/Makefile @@ -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: diff --git a/action.yaml b/action.yaml index a61c3c9..93a4606 100644 --- a/action.yaml +++ b/action.yaml @@ -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 diff --git a/approval.go b/approval.go index 9516b64..81cd821 100644 --- a/approval.go +++ b/approval.go @@ -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 } diff --git a/go.mod b/go.mod index 413e6d2..9e96142 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/trstringer/manual-approval +module github.com/snskArora/manual-approval go 1.17