Skip to content

Commit

Permalink
Add mergable config (#7)
Browse files Browse the repository at this point in the history
* add mergable

* add default repo settings for this organization

* push mergify

* fix config
  • Loading branch information
osterman authored Feb 26, 2024
1 parent 59d725d commit a2abbd1
Show file tree
Hide file tree
Showing 3 changed files with 190 additions and 1 deletion.
51 changes: 51 additions & 0 deletions .github/mergify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@

pull_request_rules:
- name: "merge automated PRs that only update the markdown files, images or videos"
conditions:
- "#check-pending=0"
- or:
- "base=master"
- "base=main"
- "head~=auto-update/.*"
- "author=cloudpossebot"
- "files~=\\.(md|gif|png|jpg|mp4)$"
actions:
label:
add:
- "no-release"
merge:
method: "squash"

- name: "delete the head branch after merge"
conditions:
- "merged"
actions:
delete_head_branch: {}

- name: "ask to resolve conflict"
conditions:
- "conflict"
actions:
comment:
message: "This pull request now has conflicts. Could you fix it @{{author}}? 🙏"

- name: "remove outdated reviews"
conditions:
- "base=master"
actions:
dismiss_reviews:
changes_requested: true
approved: true
message: "This Pull Request has been updated, so we're dismissing all reviews."

- name: close stale pull request
conditions:
- or:
- base=main
- base=master
- -closed
- updated-at < 30 days ago
actions:
close:
message: |
This pull request looks stale. Feel free to reopen it if you think it's a mistake.
139 changes: 139 additions & 0 deletions .github/settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
# These settings are synced to GitHub by https://probot.github.io/apps/settings/

repository:
# See https://docs.github.com/en/rest/reference/repos#update-a-repository for all available settings.

# Note: You cannot unarchive repositories through the API. `true` to archive this repository.
archived: false

# Either `true` to enable issues for this repository, `false` to disable them.
has_issues: true

# Either `true` to enable projects for this repository, or `false` to disable them.
# If projects are disabled for the organization, passing `true` will cause an API error.
has_projects: true

# Either `true` to enable the wiki for this repository, `false` to disable it.
has_wiki: false

# Either `true` to enable downloads for this repository, `false` to disable them.
has_downloads: true

# Updates the default branch for this repository.
default_branch: main

# Either `true` to allow squash-merging pull requests, or `false` to prevent
# squash-merging.
allow_squash_merge: true

# Either `true` to allow merging pull requests with a merge commit, or `false`
# to prevent merging pull requests with merge commits.
allow_merge_commit: false

# Either `true` to allow rebase-merging pull requests, or `false` to prevent
# rebase-merging.
allow_rebase_merge: false

# Either `true` to enable automatic deletion of branches on merge, or `false` to disable
delete_branch_on_merge: true

# Either `true` to enable automated security fixes, or `false` to disable
# automated security fixes.
enable_automated_security_fixes: true

# Either `true` to enable vulnerability alerts, or `false` to disable
# vulnerability alerts.
enable_vulnerability_alerts: true

# Either `true` to make this repo available as a template repository or `false` to prevent it.
is_template: false

# Labels: define labels for Issues and Pull Requests
labels:
- name: bug
color: '#d73a4a'
description: 🐛 An issue with the system

- name: feature
color: '#336699'
description: New functionality.

- name: bugfix
color: '#fbca04'
description: Change that restores intended behavior

- name: auto-update
color: '#ededed'
description: This PR was automatically generated

- name: do not merge
color: '#B60205'
description: Do not merge this PR, doing so would cause problems

- name: documentation
color: '#0075ca'
description: Improvements or additions to documentation

- name: duplicate
color: '#cfd3d7'
description: 'This issue or pull request already exists'

- name: enhancement
color: '#a2eeef'
description: 'New feature or request'

- name: good first issue
color: '#7057ff'
description: 'Good for newcomers'

- name: help wanted
color: '#008672'
description: 'Extra attention is needed'

- name: invalid
color: '#e4e669'
description: "This doesn't seem right"

- name: major
color: '#00FF00'
description: 'Breaking changes (or first stable release)'

- name: minor
color: '#00cc33'
description: 'New features that do not break anything'

- name: no-release
color: '#0075ca'
description: 'Do not create a new release (wait for additional code changes)'

- name: patch
color: '#0E8A16'
description: 'A minor, backward compatible change'

- name: question
color: '#d876e3'

- name: wip
color: '#B60205'
description: 'Work in Progress: Not ready for final review or merge'

- name: wontfix
color: '#B60205'
description: 'This will not be worked on'

# Note: `permission` is only valid on organization-owned repositories.
# The permission to grant the collaborator. Can be one of:
# * `pull` - can pull, but not push to or administer this repository.
# * `push` - can pull and push, but not administer this repository.
# * `admin` - can pull, push and administer this repository.
# * `maintain` - Recommended for project managers who need to manage the repository without access to sensitive or destructive actions.
# * `triage` - Recommended for contributors who need to proactively manage issues and pull requests without write access.
#
# See https://docs.github.com/en/rest/reference/teams#add-or-update-team-repository-permissions for available options
teams:
- name: admins
permission: admin
- name: engineering
permission: push
- name: contributors
permission: push
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ export DOCKER_IMAGE ?= $(DOCKER_ORG)/terraform-root-modules
export DOCKER_TAG ?= latest
export DOCKER_IMAGE_NAME ?= $(DOCKER_IMAGE):$(DOCKER_TAG)
export DOCKER_BUILD_FLAGS =
export README_DEPS ?= docs/targets.md docs/terraform.md
-include $(shell curl -sSL -o .build-harness "https://cloudposse.tools/build-harness"; echo .build-harness)

all: init deps build install run
Expand Down

0 comments on commit a2abbd1

Please sign in to comment.