Skip to content

Commit

Permalink
Merge pull request #52 from Virtomize/feat/actions
Browse files Browse the repository at this point in the history
feat: pre-commit hooks + github actions
  • Loading branch information
c-seeger authored Nov 25, 2022
2 parents 62bd0c2 + 658270f commit f1ecc79
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 35 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/gosec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: GoSec

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
gosec:
runs-on: ubuntu-latest
env:
GO111MODULE: on
steps:
- name: Checkout Source
uses: actions/checkout@v2
- name: Run Gosec Security Scanner
uses: securego/gosec@master
with:
args: "-nosec=false ./..."
26 changes: 26 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Test

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.18

- name: Run Mage
uses: magefile/mage-action@v2
with:
version: latest
args: test
10 changes: 10 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/TekWizely/pre-commit-golang
rev: v0.8.3 # update to v1 after release from beta
hooks:
- id: golangci-lint-mod
- id: go-sec-mod
- id: go-test-mod

33 changes: 0 additions & 33 deletions .travis.yml

This file was deleted.

20 changes: 18 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
[![GoDoc](https://img.shields.io/badge/godoc-reference-green.svg)](https://godoc.org/github.com/virtomize/confluence-go-api)
[![Go Report Card](https://goreportcard.com/badge/github.com/virtomize/confluence-go-api)](https://goreportcard.com/report/github.com/virtomize/confluence-go-api)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/virtomize/confluence-go-api/blob/master/LICENSE)
[![Build Status](https://travis-ci.com/virtomize/confluence-go-api.svg?branch=master)](https://travis-ci.com/virtomize/confluence-go-api)
[![Built with Mage](https://magefile.org/badge.svg)](https://magefile.org)


Expand Down Expand Up @@ -70,7 +69,7 @@ func main() {

### Using a Personal Access Token

To generate a confluence personal access token (PAT) see this article: https://confluence.atlassian.com/enterprise/using-personal-access-tokens-1026032365.html. Only set the token in the NewAPI function
To generate a confluence personal access token (PAT) see this article: [using personal access tokens](https://confluence.atlassian.com/enterprise/using-personal-access-tokens-1026032365.html). Only set the token in the NewAPI function

```
api, err := goconfluence.NewAPI("https://<your-domain>.atlassian.net/wiki/rest/api", "", "<personal-access-token>")
Expand All @@ -91,3 +90,20 @@ The Confluence API documentation [can be found here](https://docs.atlassian.com/
Thank you for participating to this project.
Please see our [Contribution Guidlines](https://github.com/virtomize/confluence-go-api/blob/master/CONTRIBUTING.md) for more information.


Thank you for participating to this project.
Please see our [Contribution Guidlines](https://github.com/virtomize/uii-go-cli/blob/master/CONTRIBUTING.md) for more information.

### Pre-Commit

This repo uses [pre-commit hooks](https://pre-commit.com/). Please install pre-commit and do `pre-commit install`

### Conventional Commits

Format commit messaged according to [Conventional Commits standard](https://www.conventionalcommits.org/en/v1.0.0/).

### Semantic Versioning

Whenever you need to version something make use of [Semantic Versioning](https://semver.org).


0 comments on commit f1ecc79

Please sign in to comment.