Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM golang:1.14 as builder
FROM golang:1.26.4 AS builder
ADD . /go/src/github.com/telia-oss/github-pr-resource
WORKDIR /go/src/github.com/telia-oss/github-pr-resource
RUN curl -sL https://taskfile.dev/install.sh | sh
RUN ./bin/task build

FROM alpine:3.11 as resource
FROM alpine:3.24 AS resource
COPY --from=builder /go/src/github.com/telia-oss/github-pr-resource/build /opt/resource
RUN apk add --update --no-cache \
git \
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ empty commit to the PR*.
| `context` | No | `unit-test` | A context to use for the status, which is prefixed by `base_context`. Defaults to `status`. |
| `comment` | No | `hello world!` | A comment to add to the pull request. |
| `comment_file` | No | `my-output/comment.txt` | Path to file containing a comment to add to the pull request (e.g. output of `terraform plan`). |
| `label` | No | `ready-to-merge` | A label to add to the pull request. |
| `target_url` | No | `$ATC_EXTERNAL_URL/builds/$BUILD_ID` | The target URL for the status, where users are sent when clicking details (defaults to the Concourse build page). |
| `description` | No | `Concourse CI build failed` | The description status on the specified pull request. |
| `description_file` | No | `my-output/description.txt` | Path to file containing the description status to add to the pull request |
Expand Down Expand Up @@ -197,7 +198,7 @@ Ref the above, here are some examples of running `check` against large repositor

For the other two operations the costing is a bit easier:
- `get`: Fixed cost of 1. Fetches the pull request at the given commit.
- `put`: Uses the V3 API and has a min cost of 1, +1 for each of `status`, `comment` and `comment_file` etc.
- `put`: Uses the V3 API and has a min cost of 1, +1 for each of `status`, `comment`, `comment_file`, `label` etc.

## Migrating

Expand Down Expand Up @@ -241,7 +242,6 @@ If you are coming from [jtarchie/github-pullrequest-resource][original-resource]
- `git.*` (with the exception of `git_depth`, see above)
- `put`:
- `merge.*`
- `label`

Note that if you are migrating from the original resource on a Concourse version prior to `v5.0.0`, you might
see an error `failed to unmarshal request: json: unknown field "ref"`. The solution is to rename the resource
Expand Down
7 changes: 5 additions & 2 deletions Taskfile.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
version: '2'
version: '3'

vars:
BUILD_DIR: build
DOCKER_REPO: teliaoss/github-pr-resource

tasks:
default:
desc: List available tasks
silent: true
cmds:
- task: test
- task --list-all

generate:
desc: Generate test fakes
Expand Down Expand Up @@ -51,6 +53,7 @@ tasks:
vars: {BINARY: out}

go-build:
desc: Build one resource binary. Requires BINARY.
cmds:
- go build -o {{.BUILD_DIR}}/{{.BINARY}}{{exeExt}} -ldflags="-s -w" -v cmd/{{.BINARY}}/main.go
env:
Expand Down
1 change: 1 addition & 0 deletions e2e/e2e_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build e2e
// +build e2e

package e2e_test
Expand Down
72 changes: 32 additions & 40 deletions fakes/fake_git.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading