diff --git a/.github/ISSUE_TEMPLATE/bug-report.yaml b/.github/ISSUE_TEMPLATE/bug-report.yaml index 0289c27..89b75ae 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yaml +++ b/.github/ISSUE_TEMPLATE/bug-report.yaml @@ -64,6 +64,22 @@ body: - BSD validations: required: true + - type: input + id: os-version + attributes: + label: OS version + description: What's the specific version of OS? + placeholder: "Run `uname -srm` command to get the info, for example: Darwin 21.5.0 arm64, Linux 5.4.0-137-generic x86_64" + validations: + required: true + - type: input + id: go-version + attributes: + label: Go version + description: What's the specific version of Go? + placeholder: "Run `go version` command to get the info, for example: go1.20.5 linux/amd64" + validations: + required: true - type: textarea id: logs attributes: diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 1c73551..ad47ade 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -7,12 +7,22 @@ on: - dev paths-ignore: - '**.md' + - '.github/FUNDING.yml' + - '.github/release-drafter.yml' + - '.github/ISSUE_TEMPLATE/*' + - '.github/workflows/pull-request.yml' + - '.github/workflows/release-drafter.yml' pull_request: branches: - master - dev paths-ignore: - '**.md' + - '.github/FUNDING.yml' + - '.github/release-drafter.yml' + - '.github/ISSUE_TEMPLATE/*' + - '.github/workflows/pull-request.yml' + - '.github/workflows/release-drafter.yml' schedule: # ┌───────────── minute (0 - 59) # │ ┌───────────── hour (0 - 23) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml new file mode 100644 index 0000000..f9bf063 --- /dev/null +++ b/.github/workflows/pull-request.yml @@ -0,0 +1,19 @@ +name: Check pull request target +on: + pull_request: + types: + - opened + - reopened + - synchronize + branches: + - master +jobs: + check-branches: + runs-on: ubuntu-latest + steps: + - name: Check target branch + run: | + if [ ${{ github.head_ref }} != "dev" ]; then + echo "Only pull requests from dev branch are only allowed to be merged into master branch." + exit 1 + fi diff --git a/.github/workflows/release-drafter.yaml b/.github/workflows/release-drafter.yml similarity index 100% rename from .github/workflows/release-drafter.yaml rename to .github/workflows/release-drafter.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d1bee27..f595e42 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,12 +7,26 @@ on: - dev paths-ignore: - '**.md' + - '.github/FUNDING.yml' + - '.github/release-drafter.yml' + - '.github/ISSUE_TEMPLATE/*' + - '.github/workflows/codeql.yml' + - '.github/workflows/pull-request.yml' + - '.github/workflows/release-drafter.yml' + - 'examples/*' pull_request: branches: - master - dev paths-ignore: - '**.md' + - '.github/FUNDING.yml' + - '.github/release-drafter.yml' + - '.github/ISSUE_TEMPLATE/*' + - '.github/workflows/codeql.yml' + - '.github/workflows/pull-request.yml' + - '.github/workflows/release-drafter.yml' + - 'examples/*' env: GO111MODULE: on diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6911574..1ccea8e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,7 +6,7 @@ - Review existing issues and provide feedback or react to them. ## With pull requests: - - Open your pull request against `master`. + - Open your pull request against `dev`. - Open one pull request for only one feature/proposal, if you have several those, please put them into different PRs, whereas you are allowed to open one pull request with several bug-fixs. - Your pull request should have no more than two commits, if not, you should squash them. - It should pass all tests in the available continuous integrations systems such as TravisCI.