Skip to content

Commit

Permalink
chore: infra for code freeze (#3395)
Browse files Browse the repository at this point in the history
Co-authored-by: Uri Bar <[email protected]>
  • Loading branch information
MarkMcCulloh and staycoolcall911 authored Jul 13, 2023
1 parent 0e7781a commit 2f76e0e
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:
push:
branches:
- main
- dev
workflow_dispatch: {}

concurrency:
Expand Down Expand Up @@ -379,7 +380,7 @@ jobs:

publish:
name: Publish
if: ${{ github.event_name == 'push' && github.repository == 'winglang/wing' }}
if: ${{ github.event_name == 'push' && github.repository == 'winglang/wing' && github.ref == 'refs/heads/main' }}
needs:
- quality-gate
- build
Expand Down
41 changes: 40 additions & 1 deletion .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pull_request_rules:
- name: automatic merge
actions:
comment:
message: Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to [allow changes to be pushed to your fork](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/allowing-changes-to-a-pull-request-branch-created-from-a-fork)).
message: Thank you for contributing! Your pull request will be updated from {{ base }} and then merged automatically (do not update manually, and be sure to [allow changes to be pushed to your fork](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/allowing-changes-to-a-pull-request-branch-created-from-a-fork)).
queue:
name: default
method: squash
Expand All @@ -28,6 +28,45 @@ pull_request_rules:
- "#review-threads-unresolved=0"
- -approved-reviews-by~=author
- check-success=Validate PR title
- or:
- base=main
- base=dev
- or:
# Code freeze at 7am utc July 13th 2023
- updated-at<=2023-07-13T07:00:00Z
- base=dev
- or:
- check-success=Quality Gate
- -files~=^(?!docs/|logo/)

- name: backport change to main
conditions:
- base=dev
- label=pr/backport
actions:
backport:
branches:
- main

- name: documentation backport
conditions:
- base=dev
- updated-at > 2023-07-13T07:00:00Z
- -files~=^(?!docs/|logo/)
actions:
label:
add:
- pr/backport

- name: Inform about code freeze
conditions:
- base=main
- updated-at > 2023-07-13T07:00:00Z
- -author=mergify[bot]
actions:
comment:
message: |
:warning: **Code freeze in effect!** :warning:
The `main` branch is currently frozen. Only critical fixes or documentation updates will be merged.
Please submit your pull request against the `dev` branch instead.

0 comments on commit 2f76e0e

Please sign in to comment.