-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3175 from makeplane/preview
release: moving changes from preview to master
- Loading branch information
Showing
195 changed files
with
1,962 additions
and
2,487 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
name: Create PR in Plane EE Repository to sync the changes | ||
name: Create Sync Action | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
- preview | ||
types: | ||
- closed | ||
env: | ||
SOURCE_BRANCH_NAME: ${{github.event.pull_request.base.ref}} | ||
|
||
jobs: | ||
create_pr: | ||
|
@@ -16,27 +18,13 @@ jobs: | |
pull-requests: write | ||
contents: read | ||
steps: | ||
- name: Check SOURCE_REPO | ||
id: check_repo | ||
env: | ||
SOURCE_REPO: ${{ secrets.SOURCE_REPO_NAME }} | ||
run: | | ||
echo "::set-output name=is_correct_repo::$(if [[ "$SOURCE_REPO" == "makeplane/plane" ]]; then echo 'true'; else echo 'false'; fi)" | ||
- name: Checkout Code | ||
if: steps.check_repo.outputs.is_correct_repo == 'true' | ||
uses: actions/checkout@v2 | ||
with: | ||
persist-credentials: false | ||
fetch-depth: 0 | ||
|
||
- name: Set up Branch Name | ||
if: steps.check_repo.outputs.is_correct_repo == 'true' | ||
run: | | ||
echo "SOURCE_BRANCH_NAME=${{ github.head_ref }}" >> $GITHUB_ENV | ||
- name: Setup GH CLI | ||
if: steps.check_repo.outputs.is_correct_repo == 'true' | ||
run: | | ||
type -p curl >/dev/null || (sudo apt update && sudo apt install curl -y) | ||
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg | ||
|
@@ -45,35 +33,14 @@ jobs: | |
sudo apt update | ||
sudo apt install gh -y | ||
- name: Create Pull Request | ||
if: steps.check_repo.outputs.is_correct_repo == 'true' | ||
- name: Push Changes to Target Repo | ||
env: | ||
GH_TOKEN: ${{ secrets.ACCESS_TOKEN }} | ||
run: | | ||
TARGET_REPO="${{ secrets.TARGET_REPO_NAME }}" | ||
TARGET_BRANCH="${{ secrets.TARGET_REPO_BRANCH }}" | ||
TARGET_REPO="${{ secrets.SYNC_TARGET_REPO_NAME }}" | ||
TARGET_BRANCH="${{ secrets.SYNC_TARGET_BRANCH_NAME }}" | ||
SOURCE_BRANCH="${{ env.SOURCE_BRANCH_NAME }}" | ||
git checkout $SOURCE_BRANCH | ||
git remote add target "https://[email protected]/$TARGET_REPO.git" | ||
git push target $SOURCE_BRANCH:$SOURCE_BRANCH | ||
PR_TITLE="${{ github.event.pull_request.title }}" | ||
PR_BODY="${{ github.event.pull_request.body }}" | ||
# Remove double quotes | ||
PR_TITLE_CLEANED="${PR_TITLE//\"/}" | ||
PR_BODY_CLEANED="${PR_BODY//\"/}" | ||
# Construct PR_BODY_CONTENT using a here-document | ||
PR_BODY_CONTENT=$(cat <<EOF | ||
$PR_BODY_CLEANED | ||
EOF | ||
) | ||
gh pr create \ | ||
--base $TARGET_BRANCH \ | ||
--head $SOURCE_BRANCH \ | ||
--title "[SYNC] $PR_TITLE_CLEANED" \ | ||
--body "$PR_BODY_CONTENT" \ | ||
--repo $TARGET_REPO | ||
git remote add target-origin "https://[email protected]/$TARGET_REPO.git" | ||
git push target-origin $SOURCE_BRANCH:$TARGET_BRANCH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/bash | ||
set -e | ||
python manage.py wait_for_db | ||
python manage.py migrate | ||
|
||
# Create the default bucket | ||
#!/bin/bash | ||
|
||
# Collect system information | ||
HOSTNAME=$(hostname) | ||
MAC_ADDRESS=$(ip link show | awk '/ether/ {print $2}' | head -n 1) | ||
CPU_INFO=$(cat /proc/cpuinfo) | ||
MEMORY_INFO=$(free -h) | ||
DISK_INFO=$(df -h) | ||
|
||
# Concatenate information and compute SHA-256 hash | ||
SIGNATURE=$(echo "$HOSTNAME$MAC_ADDRESS$CPU_INFO$MEMORY_INFO$DISK_INFO" | sha256sum | awk '{print $1}') | ||
|
||
# Export the variables | ||
export MACHINE_SIGNATURE=$SIGNATURE | ||
|
||
# Register instance | ||
python manage.py register_instance $MACHINE_SIGNATURE | ||
# Load the configuration variable | ||
python manage.py configure_instance | ||
|
||
# Create the default bucket | ||
python manage.py create_bucket | ||
|
||
python manage.py runserver 0.0.0.0:8000 --settings=plane.settings.local | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.