-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from StatusCakeDev/auto-merge-pull-requests
ci(dependabot): auto merge pull requests
- Loading branch information
Showing
11 changed files
with
146 additions
and
80 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/[email protected] | ||
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/[email protected] | ||
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
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,17 @@ | ||
# vi: ft=yaml | ||
--- | ||
exclude: | ||
- .bundle/ | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,30 +5,30 @@ | |
In the interest of fostering an open and welcoming environment, we as | ||
contributors and maintainers pledge to making participation in our project and | ||
our community a harassment-free experience for everyone, regardless of age, body | ||
size, disability, ethnicity, gender identity and expression, level of experience, | ||
nationality, personal appearance, race, religion, or sexual identity and | ||
orientation. | ||
size, disability, ethnicity, gender identity and expression, level of | ||
experience, nationality, personal appearance, race, religion, or sexual identity | ||
and orientation. | ||
|
||
## Our Standards | ||
|
||
Examples of behaviour that contributes to creating a positive environment | ||
include: | ||
|
||
* Using welcoming and inclusive language | ||
* Being respectful of differing viewpoints and experiences | ||
* Gracefully accepting constructive criticism | ||
* Focusing on what is best for the community | ||
* Showing empathy towards other community members | ||
- Using welcoming and inclusive language | ||
- Being respectful of differing viewpoints and experiences | ||
- Gracefully accepting constructive criticism | ||
- Focusing on what is best for the community | ||
- Showing empathy towards other community members | ||
|
||
Examples of unacceptable behaviour by participants include: | ||
|
||
* The use of sexualized language or imagery and unwelcome sexual attention or | ||
advances | ||
* Trolling, insulting/derogatory comments, and personal or political attacks | ||
* Public or private harassment | ||
* Publishing others' private information, such as a physical or electronic | ||
- The use of sexualized language or imagery and unwelcome sexual attention or | ||
advances | ||
- Trolling, insulting/derogatory comments, and personal or political attacks | ||
- Public or private harassment | ||
- Publishing others' private information, such as a physical or electronic | ||
address, without explicit permission | ||
* Other conduct which could reasonably be considered inappropriate in a | ||
- Other conduct which could reasonably be considered inappropriate in a | ||
professional setting | ||
|
||
## Our Responsibilities | ||
|
@@ -37,11 +37,11 @@ Project maintainers are responsible for clarifying the standards of acceptable | |
behaviour and are expected to take appropriate and fair corrective action in | ||
response to any instances of unacceptable behaviour. | ||
|
||
Project maintainers have the right and responsibility to remove, edit, or | ||
reject comments, commits, code, wiki edits, issues, and other contributions | ||
that are not aligned to this Code of Conduct, or to ban temporarily or | ||
permanently any contributor for other behaviours that they deem inappropriate, | ||
threatening, offensive, or harmful. | ||
Project maintainers have the right and responsibility to remove, edit, or reject | ||
comments, commits, code, wiki edits, issues, and other contributions that are | ||
not aligned to this Code of Conduct, or to ban temporarily or permanently any | ||
contributor for other behaviours that they deem inappropriate, threatening, | ||
offensive, or harmful. | ||
|
||
## Scope | ||
|
||
|
@@ -55,20 +55,21 @@ further defined and clarified by project maintainers. | |
## Enforcement | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behaviour may be | ||
reported by contacting the project team at [email protected]. All | ||
reported by contacting the [project team](mailto:[email protected]). All | ||
complaints will be reviewed and investigated and will result in a response that | ||
is deemed necessary and appropriate to the circumstances. The project team is | ||
obligated to maintain confidentiality with regard to the reporter of an incident. | ||
Further details of specific enforcement policies may be posted separately. | ||
obligated to maintain confidentiality with regard to the reporter of an | ||
incident. Further details of specific enforcement policies may be posted | ||
separately. | ||
|
||
Project maintainers who do not follow or enforce the Code of Conduct in good | ||
faith may face temporary or permanent repercussions as determined by other | ||
members of the project's leadership. | ||
|
||
## Attribution | ||
|
||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, | ||
available at [http://contributor-covenant.org/version/1/4][version] | ||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], | ||
version 1.4, available at [http://contributor-covenant.org/version/1/4][version] | ||
|
||
[homepage]: http://contributor-covenant.org | ||
[version]: http://contributor-covenant.org/version/1/4/ |
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
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