Compare commits

..

5 Commits

Author SHA1 Message Date
ff27016534 Merge pull request 'Update README.md' (#1) from force_build into main
Reviewed-on: #1
2023-08-24 20:15:49 -04:00
e0d234213e Merge branch 'main' into force_build
All checks were successful
/ test (pull_request) Successful in 2m0s
2023-07-26 19:04:23 -04:00
3242503554 Update .github/workflows/coverage.yml 2023-07-26 19:04:07 -04:00
8dce67f3d2 Update README.md
Some checks failed
/ test (pull_request) Failing after 18s
2023-07-26 19:01:27 -04:00
a1475ca95b Update README.md 2023-07-26 18:59:59 -04:00
6 changed files with 15 additions and 88 deletions

View File

@ -1,27 +0,0 @@
#!/bin/bash
# The script below adds the branch name automatically to
# every one of your commit messages. The regular expression
# below searches for linear issue key's. The issue key will
# be extracted out of your branch name
REGEX_ISSUE_ID="[a-zA-Z0-9]+-[0-9]+"
# Find current branch name
BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)
COMMIT_MSG_FILE=$1
COMMIT_TEXT=$(cat "$COMMIT_MSG_FILE")
if [[ -z "$BRANCH_NAME" ]]; then
echo "Commit message validation failed: no branch name!"; exit 1
fi
# Extract issue id from branch name
ISSUE_ID=$(echo "$BRANCH_NAME" | grep -o -E "$REGEX_ISSUE_ID" | head -1 | awk '{print toupper($0)}')
if [[ "$ISSUE_ID" != "GO-"* ]]; then
echo "Commit message validation failed: branch name should contain issue name!"; exit 1
fi
if [[ "$COMMIT_TEXT" != "GO-"* ]]; then
echo "$ISSUE_ID" "$COMMIT_TEXT" > "$COMMIT_MSG_FILE"
fi

View File

@ -1,17 +0,0 @@
#!/usr/bin/env bash
INSTALL_PYTHON=python3
ARGS=(hook-impl --config=.pre-commit-config.yaml --hook-type=pre-push)
# end templated
HERE="$(cd "$(dirname "$0")" && pwd)"
ARGS+=(--hook-dir "$HERE" -- "$@")
if [ -x "$INSTALL_PYTHON" ]; then
exec "$INSTALL_PYTHON" -mpre_commit "${ARGS[@]}"
elif command -v pre-commit > /dev/null; then
exec pre-commit "${ARGS[@]}"
else
echo '`pre-commit` not found. Please visit https://wiki.anytype.io/doc/mandatory-git-hooks-5rQt1Qyw7k ' 1>&2
exit 1
fi

View File

@ -3,10 +3,6 @@ on:
branches:
- main
permissions:
contents: write
pull-requests: write
jobs:
test:
runs-on: ubuntu-latest
@ -21,35 +17,20 @@ jobs:
- name: git config
run: git config --global url.https://${{ secrets.ANYTYPE_PAT }}@github.com/.insteadOf https://github.com/
# cache {{
- id: go-cache-paths
run: |
echo "GOCACHE=$(go env GOCACHE)" >> $GITHUB_OUTPUT
echo "GOMODCACHE=$(go env GOMODCACHE)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
with:
path: |
${{ steps.go-cache-paths.outputs.GOCACHE }}
${{ steps.go-cache-paths.outputs.GOMODCACHE }}
key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-${{ matrix.go-version }}-
# }}
- name: Setup license repository
uses: actions/checkout@master
with:
repository: anyproto/open
ref: refs/heads/main
path: ./open
- name: Check licenses
run: |
cd open
python3 tools/generate.py --platform golang
cd ..
sudo gem install license_finder
license_finder inherited_decisions add open/decisions.yml
license_finder --enabled-package-managers gomodules
# # cache {{
# - id: go-cache-paths
# run: |
# echo "GOCACHE=$(go env GOCACHE)" >> $GITHUB_OUTPUT
# echo "GOMODCACHE=$(go env GOMODCACHE)" >> $GITHUB_OUTPUT
# - uses: actions/cache@v3
# with:
# path: |
# ${{ steps.go-cache-paths.outputs.GOCACHE }}
# ${{ steps.go-cache-paths.outputs.GOMODCACHE }}
# key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }}
# restore-keys: |
# ${{ runner.os }}-go-${{ matrix.go-version }}-
# # }}
- name: deps
run: make deps
@ -74,4 +55,3 @@ jobs:
echo "Failed"
exit 1
fi
- uses: seriousben/go-patch-cover-action@v1

View File

@ -1,5 +0,0 @@
repos:
- repo: https://github.com/zricethezav/gitleaks
rev: v8.16.0
hooks:
- id: gitleaks

View File

@ -2,10 +2,6 @@
export GOPRIVATE=github.com/anyproto
export PATH:=deps:$(PATH)
all:
@set -e;
@git config core.hooksPath .githooks;
proto:
@echo 'Generating protobuf packages (Go)...'

View File

@ -40,4 +40,4 @@ Follow us on [Github](https://github.com/anyproto) and join the [Contributors Co
---
Made by Any — a Swiss association 🇨🇭
Licensed under [MIT License](./LICENSE).
Licensed under [MIT License](./LICENSE).