Skip to content

Commit 4321505

Browse files
committed
Initial commit
0 parents  commit 4321505

8 files changed

+166
-0
lines changed

.drone.yml

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
kind: pipeline
2+
name: default
3+
4+
steps:
5+
- name: fetch
6+
image: docker:git
7+
commands:
8+
- git fetch origin master
9+
- git fetch --tags
10+
when:
11+
event: [tag]
12+
13+
- name: test
14+
image: golang
15+
volumes:
16+
- name: deps
17+
path: /go
18+
commands:
19+
- make ci
20+
depends_on: [clone]
21+
when:
22+
event: [pull_request]
23+
24+
- name: validate commits
25+
image: commitsar/commitsar:0.7.0
26+
depends_on: [clone]
27+
when:
28+
event: [pull_request]
29+
30+
- name: release notes
31+
image: commitsar/release-notary:0.3.1
32+
environment:
33+
GITHUB_TOKEN:
34+
from_secret: github_token
35+
GITHUB_REPOSITORY: ${CI_REPO}
36+
when:
37+
event: tag
38+
depends_on: [fetch]
39+
40+
- name: release
41+
image: golang
42+
environment:
43+
GITHUB_TOKEN:
44+
from_secret: github_token
45+
volumes:
46+
- name: deps
47+
path: /go
48+
commands:
49+
- curl -sL https://git.io/goreleaser | bash
50+
when:
51+
event: tag
52+
depends_on: [fetch]
53+
54+
volumes:
55+
- name: deps
56+
temp: {}

.goreleaser.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# This is an example goreleaser.yaml file with some sane defaults.
2+
# Make sure to check the documentation at http://goreleaser.com
3+
before:
4+
hooks:
5+
# you may remove this if you don't use vgo
6+
- go mod download
7+
builds:
8+
- env:
9+
- CGO_ENABLED=0
10+
archives:
11+
- replacements:
12+
darwin: Darwin
13+
linux: Linux
14+
windows: Windows
15+
386: i386
16+
amd64: x86_64
17+
checksum:
18+
name_template: "checksums.txt"
19+
snapshot:
20+
name_template: "{{ .Tag }}-next"
21+
changelog:
22+
skip: true

.kodiak.toml

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# .kodiak.toml
2+
version = 1
3+
4+
[merge]
5+
6+
require_automerge_label = false
7+
8+
# if this title regex matches, Kodiak will not merge the PR. this is useful
9+
# to prevent merging work in progress PRs
10+
blacklist_title_regex = "" # default: "^WIP.*", options: "" (disables regex), a regex string (e.g. ".*DONT\s*MERGE.*")
11+
12+
# if these labels are set Kodiak will not merge the PR
13+
blacklist_labels = ["wip"] # default: [], options: list of label names (e.g. ["wip"])
14+
15+
# choose a merge method. If the configured merge method is disabled for a
16+
# repository, Kodiak will report an error in a status message.
17+
method = "rebase" # default: "merge", options: "merge", "squash", "rebase"
18+
19+
# once a PR is merged into master, delete the branch
20+
delete_branch_on_merge = true # default: false
21+
22+
# if you request review from a user, don't merge until that user provides a
23+
# review, even if the PR is passing all checks
24+
block_on_reviews_requested = true # default: false
25+
26+
# if there are running status checks on a PR when it's up for merge, don't
27+
# wait for those to finish before updating the branch
28+
optimistic_updates = true # default: true
29+
30+
# use this for status checks that run indefinitely, like deploy jobs or the
31+
# WIP GitHub App
32+
dont_wait_on_status_checks = [] # default: [], options: list of check names (e.g. ["ci/circleci: lint_api"])
33+
34+
35+
[merge.message]
36+
# by default, github uses the first commit title for the PR of a merge.
37+
# "pull_request_title" uses the PR title.
38+
title = "github_default" # default: "github_default", options: "github_default", "pull_request_title"
39+
40+
# by default, GithHub combines the titles a PR's commits to create the body
41+
# text of a merge. "pull_request_body" uses the content of the PR to generate
42+
# the body content while "empty" simple gives an empty string.
43+
body = "github_default" # default: "github_default", options: "github_default", "pull_request_body", "empty"
44+
45+
# GitHub adds the PR number to the title of merges created through the UI.
46+
# This setting replicates that feature.
47+
include_pr_number = true # default: true
48+
49+
# markdown is the normal format for GitHub merges
50+
body_type = "markdown" # default: "markdown", options: "plain_text", "markdown", "html"
51+
52+
# useful for stripping HTML comments created by PR templates when the `markdown` `body_type` is used.
53+
strip_html_comments = false # default: false

Makefile

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
install_deps:
2+
go mod download
3+
4+
# Standard go test
5+
test:
6+
go test ./... -v -race
7+
8+
# Make sure no unnecessary dependecies are present
9+
go-mod-tidy:
10+
go mod tidy -v
11+
git diff-index --quiet HEAD
12+
13+
# Run all tests & linters in CI
14+
ci: test go-mod-tidy

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Git
2+
3+
[![Build Status](https://cloud.drone.io/api/badges/commitsar-app/git/status.svg)](https://cloud.drone.io/commitsar-app/git)
4+
5+
Helper functions for Git in use across Commitsar and Release Notary

go.mod

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module github.com/commitsar-app/git
2+
3+
go 1.12

main.go

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package main
2+
3+
import (
4+
"log"
5+
)
6+
7+
func main() {
8+
log.Println("hello world")
9+
}

renovate.json

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"postUpdateOptions": ["gomodTidy"],
3+
"extends": ["config:base"]
4+
}

0 commit comments

Comments
 (0)