-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(dependabot): auto merge pull requests
- Loading branch information
1 parent
ae35eab
commit 5c39de6
Showing
12 changed files
with
157 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,6 @@ | |
|
||
root = true | ||
|
||
|
||
[*] | ||
end_of_line = lf | ||
charset = utf-8 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
--- | ||
name: auto-merge | ||
on: | ||
pull_request: | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
jobs: | ||
check-can-auto-merge: | ||
if: github.triggering_actor == 'dependabot[bot]' | ||
name: Check if PR can be auto-merged | ||
runs-on: ubuntu-latest | ||
outputs: | ||
can-auto-merge: ${{ steps.can-auto-merge.outputs.approve }} | ||
steps: | ||
- uses: dependabot/fetch-metadata@v2.2.0 | ||
id: dependabot-metadata | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
- if: | | ||
steps.dependabot-metadata.outputs.update-type == 'version-update:semver-patch' || | ||
steps.dependabot-metadata.outputs.package-ecosystem == 'github_actions' | ||
id: can-auto-merge | ||
run: echo "approve=true" >> $GITHUB_OUTPUT | ||
auto-merge: | ||
needs: check-can-auto-merge | ||
if: needs.check-can-auto-merge.outputs.can-auto-merge == 'true' | ||
name: Auto merge pull requests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: dependabot/fetch-metadata@v2.2.0 | ||
id: dependabot-metadata | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Approve Dependabot PR | ||
run: gh pr review --approve "${PR_URL}" | ||
env: | ||
PR_URL: ${{ github.event.pull_request.html_url }} | ||
# Because we enforce PRs be approved by a code owner, a token from the | ||
# operations team must be used to approve the PR. This token is from the | ||
# StatusCake machine account which has been given membership to the | ||
# operations team. | ||
GITHUB_TOKEN: ${{ secrets.MACHINE_TOKEN }} | ||
- name: Enable auto-merge for Dependabot PR | ||
run: gh pr merge --auto --merge "${PR_URL}" | ||
env: | ||
PR_URL: ${{ github.event.pull_request.html_url }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"default": true, | ||
"line-length": { | ||
"tables": false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# vi: ft=yaml | ||
--- | ||
formatter: | ||
type: basic | ||
# There is a "bug" with the behaviour of this option that will move file head | ||
# comments below the initial document start. For example front matter is | ||
# rearraged and therefore misplaced in the file. This behaviour prevents | ||
# `ymalfmt` from being run in CI or automatically in code editors. | ||
include_document_start: true | ||
indentless_arrays: true | ||
pad_line_comments: 2 | ||
# There is missing functionality in `yamlfmt` to remove redundantly quoted | ||
# strings from YAML documents, and prefer the use of double quotes (or | ||
# whatever is configured). This means further manual effort is required to | ||
# correct files. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,30 @@ | ||
# How To Contribute | ||
|
||
Contributions are welcome as we strive to make this package as useful as | ||
possible for everyone. However time is not always on our side, and changes may | ||
not be reviewed or merged in a timely manner. | ||
Contributions are welcome as we strive to make this module as useful as possible | ||
for everyone. However time is not always on our side, and changes may not be | ||
reviewed or merged in a timely manner. | ||
|
||
If this package is found to be missing in functionality, please open an issue | ||
If this module is found to be missing in functionality, please open an issue | ||
describing the proposed change - discussing changes ahead of time reduces | ||
friction within pull requests. | ||
|
||
## Installation | ||
## Prerequisites | ||
|
||
You will need the following things properly installed on your computer: | ||
|
||
* `git clone <repository-url>` this repository | ||
* `cd statuscake-go` | ||
- [Git](https://git-scm.com/) | ||
- [Go](https://go.dev/) (1.13+) | ||
|
||
## Linting | ||
## Installation | ||
|
||
* `golint ./...` | ||
- `git clone <repository-url>` this repository | ||
- `cd statuscake-go` | ||
|
||
## Running tests | ||
|
||
* `go test ./...` | ||
- `go test ./...` | ||
|
||
## Making Changes | ||
|
||
Begin by creating a new branch. It is appreciated if branch names are written | ||
using kebab-case. | ||
|
||
```bash | ||
git checkout master | ||
git pull --rebase | ||
git checkout -b my-new-feature | ||
``` | ||
|
||
Make the desired change, and ensure both the linter and test suite continue to | ||
pass. Once this requirement is met push the change back to a fork of this | ||
repository. | ||
|
||
```bash | ||
git push -u origin my-new-feature | ||
``` | ||
|
||
Finally open a pull request through the GitHub UI. Upon doing this the CI suite | ||
will be run to ensure changes do not break current functionality. | ||
|
||
Changes are more likely to be approve if they: | ||
|
||
- Include tests for new functionality, | ||
- Are accompanied with a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html), | ||
- Contain few commits (preferably a single commit), | ||
- Do not contain merge commits, | ||
- Maintain backward compatibility. | ||
See the contributing guide at | ||
[devhandbook.org](https://devhandbook.org/contributing) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters