diff --git a/.github/workflows/connector_code_freeze.yml b/.github/workflows/connector_code_freeze.yml
index 77f446683f92..a5ac4c8a3661 100644
--- a/.github/workflows/connector_code_freeze.yml
+++ b/.github/workflows/connector_code_freeze.yml
@@ -1,4 +1,10 @@
-name: Connector Code freeze
+# This workflow is meant to be used to prevent/discourage merging to master during code freeze.
+# The code freeze dates are set in the env variables CODE_FREEZE_START_DATE and CODE_FREEZE_END_DATE.
+# If any connector code has been changed we display a warning message reminding merging is blocked and who to contact.
+# If no connector connector code has been changed we only display a warning message reminding merging is discouraged.
+# The Code freeze check job will be set as a required check for PRs in branch protection rules.
+
+name: Code freeze
on:
pull_request:
@@ -7,20 +13,67 @@ on:
- synchronize
- ready_for_review
+env:
+ CODE_FREEZE_START_DATE: "2023-12-21"
+ CODE_FREEZE_END_DATE: "2024-01-02"
jobs:
code-freeze-check:
- name: Connector code freeze check
+ runs-on: ubuntu-latest
+ name: Code freeze check
+ permissions:
+ # This is required to be able to comment on PRs and list changed files
+ pull-requests: write
steps:
- - name: Checkout Airbyte
- uses: actions/checkout@v3
+ # Check if code freeze is in effect by comparing the current date with the start and end date of the code freeze
+ - name: Check code freeze in effect
+ id: check-code-freeze-in-effect
+ run: |
+ start_date=$(date -d "$CODE_FREEZE_START_DATE" +%s)
+ end_date=$(date -d "$CODE_FREEZE_END_DATE" +%s)
+ current_date=$(date +%s)
+
+ if [ "$current_date" -ge "$start_date" ] && [ "$current_date" -le "$end_date" ]; then
+ echo "Code freeze is in effect"
+ echo "::set-output name=is_in_code_freeze::true"
+ else
+ echo "Code freeze is not in effect"
+ echo "::set-output name=is_in_code_freeze::false"
+ fi
+
+ # Use GitHub PR Api to get the list of changed files
+ # Filter the list to only keep the connectors files
- name: Get changed files
- uses: tj-actions/changed-files@v39
+ if: steps.check-code-freeze-in-effect.outputs.is_in_code_freeze == 'true'
+ id: changed-files
+ uses: tj-actions/changed-files@v40
with:
files_yaml: |
connectors:
- - 'airbyte-integration/connectors/**'
+ - 'airbyte-integrations/connectors/**'
- '!**/*.md'
- - name: Fail workflow if connector files was changed
- if: steps.changes.outputs.connectors_any_changed == 'true'
+
+ # If any connector code has been changed we display a warning message reminding merging is blocked and who to contact
+ - name: Code freeze comment on PR
+ if: steps.changed-files.outputs.connectors_any_changed == 'true' && steps.check-code-freeze-in-effect.outputs.is_in_code_freeze == 'true'
+ uses: thollander/actions-comment-pull-request@v2
+ with:
+ comment_tag: code_freeze_warning
+ message: |
+ > [!WARNING]
+ > 🚨 Connector code freeze is in effect until ${{ env.CODE_FREEZE_END_DATE }}. This PR is changing connector code. Please contact the current OC engineers if you want to merge this change to master.
+
+ # If no connector code has been changed we only display a warning message reminding merging is discouraged
+ - name: Code freeze comment on PR
+ if: steps.changed-files.outputs.connectors_any_changed == 'false' && steps.check-code-freeze-in-effect.outputs.is_in_code_freeze == 'true'
+ uses: thollander/actions-comment-pull-request@v2
+ with:
+ comment_tag: code_freeze_warning
+ message: |
+ > [!WARNING]
+ > Soft code freeze is in effect until ${{ env.CODE_FREEZE_END_DATE }}. Please avoid merging to master. #freedom-and-responsibility
+
+ # Fail the workflow if connector code has been changed to prevent merging to master
+ - name: Fail workflow if connector code has been changed
+ if: steps.changed-files.outputs.connectors_any_changed == 'true' && steps.check-code-freeze-in-effect.outputs.is_in_code_freeze == 'true'
run: echo "Connector code freeze is in effect. Please contact the current OC engineers if you want to merge this change." && exit 1
diff --git a/airbyte-integrations/connectors/source-pokeapi/metadata.yaml b/airbyte-integrations/connectors/source-pokeapi/metadata.yaml
index 2597fc4c5eda..85047f016528 100644
--- a/airbyte-integrations/connectors/source-pokeapi/metadata.yaml
+++ b/airbyte-integrations/connectors/source-pokeapi/metadata.yaml
@@ -16,7 +16,7 @@ data:
icon: pokeapi.svg
license: MIT
name: PokeAPI
- releaseDate: "2020-05-04"
+ releaseDate: "2020-05-14"
releaseStage: alpha
supportLevel: community
documentationUrl: https://docs.airbyte.com/integrations/sources/pokeapi