Skip to content

Commit

Permalink
Testing GitHub's built-in auto-merge feature for dependabot PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
ylabonte committed Mar 21, 2024
1 parent 1860973 commit 8279867
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 27 deletions.
25 changes: 13 additions & 12 deletions .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
name: "Auto-Merge Dependabot PRs"

on: [ pull_request ]
on:
pull_request:
branches:
- "master"

permissions:
actions: read
security-events: write
contents: write
pull-requests: write

jobs:
ci:
name: "Run CI Workflow"
uses: ./.github/workflows/ci.yml
automerge:
name: "Auto-merge PR (Dependabot only!)"
needs:
- ci
name: "Auto-approve PR"
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'
if: github.actor == 'dependabot[bot]' || github.actor == 'ylabonte'
steps:
- name: "Auto-merge the PRs"
run: gh pr merge --auto --merge "$PR_URL"
- name: "Approve PR to enable auto-merge"
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: "Auto-merge PR"
run: gh pr merge --merge --auto "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ on:
- "master"
- "develop"
- "feature/*"
pull_request:
branches:
- "master"
- "develop"
- "feature/*"
workflow_call:

jobs:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ on:
branches: [ "master" ]
schedule:
- cron: '43 0 * * 2'
workflow_call:

jobs:
analyze:
Expand Down
6 changes: 0 additions & 6 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Contributor Covenant Code of Conduct

## Our Pledge

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
Expand All @@ -10,7 +9,6 @@ level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

Expand All @@ -32,7 +30,6 @@ Examples of unacceptable behavior by participants include:
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Expand All @@ -44,7 +41,6 @@ permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
Expand All @@ -53,7 +49,6 @@ representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [email protected]. All
complaints will be reviewed and investigated and will result in a response that
Expand All @@ -66,7 +61,6 @@ 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 https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

Expand Down
13 changes: 5 additions & 8 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
# Security Policy

## Supported Versions

Always use the most recent version. There will be no support for older
versions.
Always use the most recent version available as `stable` or `latest` in ioBroker.
There will be no support for outdated versions.

## Reporting a Vulnerability

If you identify a vulnerability, please consider that this may affect other
people/projects as well. This in mind please email me (Yannic Labonte
<[email protected]>) first, so I can react and maybe fix the issue,
before publishing it to the public (e.g. in a github issue).
If you identify a vulnerability, please consider that this may affect other people/projects as well. This in mind please
email me (Yannic Labonte <[email protected]>) first, so I can react and maybe fix the issue, before it is
published to the public (e.g. in a github issue) and maybe misused by third parties.

0 comments on commit 8279867

Please sign in to comment.