Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: auto approve bot prs #316

Merged
merged 1 commit into from
Nov 14, 2024
Merged

Conversation

mohnoor94
Copy link
Member

Situation

The repository currently requires 2 approvals for all pull requests. However, to reduce friction, only 1 approval should be required for pull requests made by bot accounts like Dependabot and Renovate.

Task

The goal is to configure the repository to automatically provide the first approval for pull requests made by trusted bot accounts while requiring a second human approval before merging.

Action

A GitHub Actions workflow was created in the .github/workflows/pr-auto-approve.yml file. This workflow:

  1. Runs on all pull request events
  2. Check if the pull request author is one of the trusted bot accounts (Dependabot, Renovate)
  3. If so, it automatically provides the first approval using the hmarr/auto-approve-action

Testing

Tested manually on another repo.

Results

With this configuration, pull requests from trusted bot accounts will only require 1 additional human approval before merging, instead of the usual 2. This reduces friction for routine updates while maintaining a level of human review.

@mohnoor94 mohnoor94 requested a review from a team as a code owner November 13, 2024 15:01
@mohnoor94 mohnoor94 enabled auto-merge (squash) November 14, 2024 11:55
@mohnoor94 mohnoor94 merged commit 806ab90 into main Nov 14, 2024
2 checks passed
@mohnoor94 mohnoor94 deleted the mohnoor94/SDK-1557/auto-approve-bot-prs branch November 14, 2024 11:56
mohnoor94 pushed a commit that referenced this pull request Nov 14, 2024
## [1.12.0](v1.11.1...v1.12.0) (2024-11-14)

### Features

* auto approve bot prs ([#316](#316)) ([806ab90](806ab90))
* **deps:** update dependencies openapi-to-postmanv2 from v4.22.0 to v4.23.1 ([#288](#288)) ([16456b8](16456b8))
* **deps:** update dependencies openapi-to-postmanv2 from v4.23.1 to v4.24.0 ([#297](#297)) ([c59dfc5](c59dfc5))
* **deps:** update dependencies openapi3-ts from v4.3.3 to v4.4.0 ([#301](#301)) ([7f535e0](7f535e0))
mohnoor94 pushed a commit that referenced this pull request Nov 25, 2024
## [1.12.0](v1.11.1...v1.12.0) (2024-11-25)

### Features

* auto approve bot prs ([#316](#316)) ([806ab90](806ab90))
* **deps:** update dependencies openapi-to-postmanv2 from v4.22.0 to v4.23.1 ([#288](#288)) ([16456b8](16456b8))
* **deps:** update dependencies openapi-to-postmanv2 from v4.23.1 to v4.24.0 ([#297](#297)) ([c59dfc5](c59dfc5))
* **deps:** update dependencies openapi3-ts from v4.3.3 to v4.4.0 ([#301](#301)) ([7f535e0](7f535e0))
mohnoor94 pushed a commit that referenced this pull request Dec 2, 2024
## [1.12.0](v1.11.1...v1.12.0) (2024-12-02)

### Features

* auto approve bot prs ([#316](#316)) ([806ab90](806ab90))
* **deps:** update dependencies openapi-to-postmanv2 from v4.22.0 to v4.23.1 ([#288](#288)) ([16456b8](16456b8))
* **deps:** update dependencies openapi-to-postmanv2 from v4.23.1 to v4.24.0 ([#297](#297)) ([c59dfc5](c59dfc5))
* **deps:** update dependencies openapi3-ts from v4.3.3 to v4.4.0 ([#301](#301)) ([7f535e0](7f535e0))
mohnoor94 pushed a commit that referenced this pull request Dec 10, 2024
## [1.12.0](v1.11.1...v1.12.0) (2024-12-10)

### Features

* auto approve bot prs ([#316](#316)) ([806ab90](806ab90))
* **deps:** update dependencies openapi-to-postmanv2 from v4.22.0 to v4.23.1 ([#288](#288)) ([16456b8](16456b8))
* **deps:** update dependencies openapi-to-postmanv2 from v4.23.1 to v4.24.0 ([#297](#297)) ([c59dfc5](c59dfc5))
* **deps:** update dependencies openapi3-ts from v4.3.3 to v4.4.0 ([#301](#301)) ([7f535e0](7f535e0))
mohnoor94 pushed a commit that referenced this pull request Dec 16, 2024
## [1.12.0](v1.11.1...v1.12.0) (2024-12-16)

### Features

* auto approve bot prs ([#316](#316)) ([806ab90](806ab90))
* **deps:** update dependencies openapi-to-postmanv2 from v4.22.0 to v4.23.1 ([#288](#288)) ([16456b8](16456b8))
* **deps:** update dependencies openapi-to-postmanv2 from v4.23.1 to v4.24.0 ([#297](#297)) ([c59dfc5](c59dfc5))
* **deps:** update dependencies openapi3-ts from v4.3.3 to v4.4.0 ([#301](#301)) ([7f535e0](7f535e0))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants