forked from salesagility/SuiteCRM
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bd64aa3
commit 05a6ec9
Showing
14,701 changed files
with
2,750,806 additions
and
1,630 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
name: Plantilla en blanco | ||
about: Crea un reporte sin plantilla | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
|
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,32 @@ | ||
--- | ||
name: Plantilla para incidencias | ||
about: Crea un reporte de la incidencia encontrada | ||
title: Incidencia - <Nombre del módulo> - <Breve descripción de la incidencia> | ||
labels: '' | ||
assignees: AlbertoSTIC | ||
|
||
--- | ||
|
||
**Descripción del problema** | ||
<!---Descripción clara y concisa de la incidencia encontrada.--> | ||
|
||
**Cómo reproducir el problema** | ||
<!---Pasos para reproducir la incidencia:--> | ||
<!---1. Ir a...--> | ||
<!---2. Entrar en...--> | ||
<!---3. Ejecutar la acción...--> | ||
<!---4. Comprobar el error... --> | ||
|
||
**Comportamiento esperado** | ||
<!---Descripción clara y concisa de cómo debería funcionar el proceso si no se produjera el error--> | ||
|
||
**Solución propuesta** | ||
<!---Si la hay, descripción clara y concisa de la propuesta para resolver la incidencia. --> | ||
|
||
**Contexto** | ||
<!---- Instancia: [url de la instancia o "global" si sucede en general] --> | ||
<!---- Idioma: [ES, CA o EN]--> | ||
<!---- Navegador: [Chrome, Firefox, Safari, IE] --> | ||
|
||
**Información adicional** | ||
<!----Añade cualquier otra información aquí.--> |
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,17 @@ | ||
--- | ||
name: Plantilla para mejoras | ||
about: Crea una propuesta de mejora | ||
title: Mejora - <Nombre del módulo> - <Breve descripción de la propuesta de mejora> | ||
labels: '' | ||
assignees: AlbertoSTIC | ||
|
||
--- | ||
|
||
**¿Está tu propuesta relacionada con algún problema o falta de funcionalidad?** | ||
<!--Describe lo más claro y conciso el caso en cuestión.--> | ||
|
||
**Descripción de la propuesta** | ||
<!--Describe lo más claro y conciso la propuesta de mejora.--> | ||
|
||
**Información adicional** | ||
<!--Añade cualquier otra información aquí.--> |
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,185 @@ | ||
name: Develop - Create Instance on Opened or Reopened PR | ||
on: | ||
pull_request: | ||
types: [opened, reopened] | ||
branches: # https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#onpushpull_requestbranchestags | ||
- '**' # matches every branch | ||
workflow_dispatch: | ||
env: | ||
DEVELOP_HOST: ${{ secrets.DEVELOP_HOST}} | ||
DEVELOP_SSH_USERNAME: ${{ secrets.DEVELOP_SSH_USERNAME}} | ||
DEVELOP_DOMAIN_NAME: ${{ secrets.DEVELOP_DOMAIN_NAME}} | ||
MAIN_HOST: ${{ secrets.MAIN_HOST}} | ||
MAIN_SSH_USERNAME: ${{ secrets.MAIN_SSH_USERNAME}} | ||
jobs: | ||
create_instance: | ||
name: Create Instance on Opened or Reopened PR | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install SSH Key | ||
uses: shimataro/ssh-key-action@v2 | ||
with: | ||
key: ${{ secrets.SSH_PRIVATE_KEY }} | ||
known_hosts: unnecessary | ||
- name: Adding Known Hosts Develop | ||
run: ssh-keyscan -H $DEVELOP_HOST >> ~/.ssh/known_hosts | ||
- name: Adding Known Hosts Main | ||
run: ssh-keyscan -H $MAIN_HOST >> ~/.ssh/known_hosts | ||
- name: Get Available database name | ||
run: | ||
DATABASE_NAME=$(ssh $DEVELOP_SSH_USERNAME@$DEVELOP_HOST "mysql -h 127.0.0.1 -u '${{ secrets.DEVELOP_DB_USERNAME }}' --password='${{ secrets.DEVELOP_DB_PASSWORD }}' -N -e 'select schema_name | ||
from information_schema.schemata | ||
where | ||
SCHEMA_NAME not in ( | ||
SELECT | ||
TABLE_SCHEMA | ||
from information_schema.tables | ||
where table_name like \"stic%\" | ||
group by TABLE_SCHEMA | ||
) | ||
and SCHEMA_NAME like \"mydevelop%\" | ||
order by SCHEMA_NAME LIMIT 1'") && | ||
echo $DATABASE_NAME && | ||
(echo "DATABASE_NAME=$DATABASE_NAME" >> $GITHUB_ENV) | ||
- name: Extract branch name | ||
run: echo 'BRANCH='${{ github.head_ref }} >> $GITHUB_ENV | ||
- name: Extract branch clean | ||
run: echo 'BRANCH_CLEAN='`echo ${{ env.BRANCH }} | sed -e 's/[^a-zA-Z0-9_/]//g'` >> $GITHUB_ENV | ||
- name: Set current date as env variable | ||
run: echo 'NOW='$(date +'%Y-%m-%d %H:%M:%S') >> $GITHUB_ENV | ||
- name: echo environment variables | ||
run: echo ${{ env }} | ||
# - name: Delete develop instance | ||
# run: ssh $DEVELOP_SSH_USERNAME@$DEVELOP_HOST "test -e /web/${{ env.BRANCH_CLEAN }}" && (echo "Directory branch exists" && ssh $DEVELOP_SSH_USERNAME@$DEVELOP_HOST "rm -rf /web/${{ env.BRANCH_CLEAN }} && mysql -h 127.0.0.1 -u $DEVELOP_DB_USERNAME --password=$DEVELOP_DB_PASSWORD -e 'drop database if exists ${{ env.DATABASE_NAME }}; create database ${{ env.DATABASE_NAME }};'") || echo "Branch doesn't exist in develop" | ||
- name: Create Instance in develop through Main | ||
run: ssh $MAIN_SSH_USERNAME@$MAIN_HOST "cd scripts/create && bash create.sh -b ${{ env.BRANCH }} -i $DEVELOP_DOMAIN_NAME -p /web/${{ env.BRANCH_CLEAN }} -db ${{ env.DATABASE_NAME }} -d -y" | ||
- name: Set Clean git branch | ||
run: ssh $DEVELOP_SSH_USERNAME@$DEVELOP_HOST "test -e /web/${{ env.BRANCH_CLEAN }}" && (echo "Directory branch exists" && ssh $DEVELOP_SSH_USERNAME@$DEVELOP_HOST "cd /web/${{ env.BRANCH_CLEAN }} && git stash && git reset && git pull") | ||
- name: Get project data | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
ORGANIZATION: SinergiaTIC | ||
PROJECT_NUMBER: 2 | ||
PR_ID: ${{ github.event.pull_request.node_id }} | ||
run: | | ||
gh api graphql -f query=' | ||
query($org: String!, $number: Int!) { | ||
organization(login: $org){ | ||
projectV2(number: $number) { | ||
id | ||
fields(first:20) { | ||
nodes { | ||
... on ProjectV2Field { | ||
id | ||
name | ||
} | ||
... on ProjectV2SingleSelectField { | ||
id | ||
name | ||
options { | ||
id | ||
name | ||
} | ||
} | ||
} | ||
} | ||
items(first:100) { | ||
nodes { | ||
... on ProjectV2Item { | ||
id | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}' -f org=$ORGANIZATION -F number=$PROJECT_NUMBER > project_data.json | ||
echo 'PROJECT_ID='$(jq '.data.organization.projectV2.id' project_data.json) >> $GITHUB_ENV | ||
echo 'URL_FIELD_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "URLValidationInstance") | .id' project_data.json) >> $GITHUB_ENV | ||
echo 'DB_FIELD_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "DBValidationInstance") | .id' project_data.json) >> $GITHUB_ENV | ||
echo 'DATE_FIELD_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "DateValidationInstance") | .id' project_data.json) >> $GITHUB_ENV | ||
echo 'CURRENT_DATE='$(date +'%Y-%m-%d') >> $GITHUB_ENV | ||
- name: Get PR Item ID | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
PR_ID: ${{ github.event.pull_request.node_id }} | ||
run: | | ||
item_id="$( gh api graphql -f query=' | ||
mutation($project:ID!, $pr:ID!) { | ||
addProjectV2ItemById(input: {projectId: $project, contentId: $pr}) { | ||
item { | ||
id | ||
} | ||
} | ||
}' -f project=$PROJECT_ID -f pr=$PR_ID --jq '.data.addProjectV2ItemById.item.id')" | ||
echo 'ITEM_ID='$item_id >> $GITHUB_ENV | ||
- name: Change Fields | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
run: | | ||
gh api graphql -f query=' | ||
mutation ( | ||
$project: ID! | ||
$item: ID! | ||
$url_field: ID! | ||
$url_value: String! | ||
) { | ||
set_status: updateProjectV2ItemFieldValue(input: { | ||
projectId: $project | ||
itemId: $item | ||
fieldId: $url_field | ||
value: { | ||
text: $url_value | ||
} | ||
}) { | ||
projectV2Item { | ||
id | ||
} | ||
} | ||
}' -f project=$PROJECT_ID -f item=$ITEM_ID -f url_field=$URL_FIELD_ID -f url_value=https://${{ env.DEVELOP_DOMAIN_NAME}}/${{ env.BRANCH_CLEAN }} --silent | ||
gh api graphql -f query=' | ||
mutation ( | ||
$project: ID! | ||
$item: ID! | ||
$db_field: ID! | ||
$db_value: String! | ||
) { | ||
set_status: updateProjectV2ItemFieldValue(input: { | ||
projectId: $project | ||
itemId: $item | ||
fieldId: $db_field | ||
value: { | ||
text: $db_value | ||
} | ||
}) { | ||
projectV2Item { | ||
id | ||
} | ||
} | ||
}' -f project=$PROJECT_ID -f item=$ITEM_ID -f db_field=$DB_FIELD_ID -f db_value=${{ env.DATABASE_NAME }} --silent | ||
gh api graphql -f query=' | ||
mutation ( | ||
$project: ID! | ||
$item: ID! | ||
$date_field: ID! | ||
$date_value: Date! | ||
) { | ||
set_status: updateProjectV2ItemFieldValue(input: { | ||
projectId: $project | ||
itemId: $item | ||
fieldId: $date_field | ||
value: { | ||
date: $date_value | ||
} | ||
}) { | ||
projectV2Item { | ||
id | ||
} | ||
} | ||
}' -f project=$PROJECT_ID -f item=$ITEM_ID -f date_field=$DATE_FIELD_ID -f date_value=$CURRENT_DATE --silent | ||
- name: Create or Edit PR comment | ||
uses: thollander/actions-comment-pull-request@v1 | ||
with: | ||
message: | | ||
Actions executed at: ${{ env.NOW }}. | ||
comment_includes: 'Actions executed at:' | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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,43 @@ | ||
name: Develop - Delete instance On Closed Pull Request | ||
on: | ||
pull_request: | ||
types: [closed] | ||
branches: # https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#onpushpull_requestbranchestags | ||
- '**' # matches every branch | ||
workflow_dispatch: | ||
env: | ||
DEVELOP_HOST: ${{ secrets.DEVELOP_HOST}} | ||
DEVELOP_SSH_USERNAME: ${{ secrets.DEVELOP_SSH_USERNAME}} | ||
DEVELOP_DB_USERNAME: ${{ secrets.DEVELOP_DB_USERNAME }} | ||
DEVELOP_DB_PASSWORD: ${{ secrets.DEVELOP_DB_PASSWORD }} | ||
jobs: | ||
delete_instance: | ||
name: Delete Develop instance | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install SSH Key | ||
uses: shimataro/ssh-key-action@v2 | ||
with: | ||
key: ${{ secrets.SSH_PRIVATE_KEY }} | ||
known_hosts: unnecessary | ||
- name: Adding Known Hosts Develop | ||
run: ssh-keyscan -H $DEVELOP_HOST >> ~/.ssh/known_hosts | ||
- name: Extract branch name | ||
run: echo 'BRANCH='${{ github.head_ref }} >> $GITHUB_ENV | ||
- name: Extract branch clean | ||
run: echo 'BRANCH_CLEAN='`echo ${{ env.BRANCH }} | sed -e 's/[^a-zA-Z0-9_/]//g'` >> $GITHUB_ENV | ||
- name: Get Develop instance database name | ||
run: echo 'DATABASE_NAME='`ssh $DEVELOP_SSH_USERNAME@$DEVELOP_HOST grep "db_name" /web/${{ env.BRANCH_CLEAN }}/config_override.php | sed "s/.*=.'//g" | sed "s/';.*//g"` >> $GITHUB_ENV | ||
- name: Set current date as env variable | ||
run: echo 'NOW='$(date +'%Y-%m-%d %H:%M:%S') >> $GITHUB_ENV | ||
- name: echo environment variables | ||
run: echo ${{ env }} | ||
- name: Delete develop instance | ||
run: ssh $DEVELOP_SSH_USERNAME@$DEVELOP_HOST "test -e /web/${{ env.BRANCH_CLEAN }}" && (echo "Directory branch exists" && ssh $DEVELOP_SSH_USERNAME@$DEVELOP_HOST "rm -rf /web/${{ env.BRANCH_CLEAN }} && mysql -h 127.0.0.1 -u $DEVELOP_DB_USERNAME --password=$DEVELOP_DB_PASSWORD -e 'drop database if exists ${{ env.DATABASE_NAME }}; create database ${{ env.DATABASE_NAME }};'") || echo "Branch doesn't exist in develop" | ||
- name: Create or Edit PR comment | ||
uses: thollander/actions-comment-pull-request@v1 | ||
with: | ||
message: | | ||
Actions executed at: ${{ env.NOW }}. | ||
comment_includes: 'Actions executed at:' | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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,41 @@ | ||
name: Develop - Update instance on Push | ||
on: | ||
pull_request: | ||
types: [synchronize] | ||
branches: # https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#onpushpull_requestbranchestags | ||
- '**' # matches every branch | ||
workflow_dispatch: | ||
env: | ||
DEVELOP_HOST: ${{ secrets.DEVELOP_HOST}} | ||
DEVELOP_SSH_USERNAME: ${{ secrets.DEVELOP_SSH_USERNAME}} | ||
jobs: | ||
update_develop_instance: | ||
name: Update develop instance | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install SSH Key | ||
uses: shimataro/ssh-key-action@v2 | ||
with: | ||
key: ${{ secrets.SSH_PRIVATE_KEY }} | ||
known_hosts: unnecessary | ||
- name: Adding Known Hosts Develop | ||
run: ssh-keyscan -H $DEVELOP_HOST >> ~/.ssh/known_hosts | ||
- name: Extract branch name | ||
run: echo 'BRANCH='${{ github.head_ref }} >> $GITHUB_ENV | ||
- name: Extract branch clean | ||
run: echo 'BRANCH_CLEAN='`echo ${{ env.BRANCH }} | sed -e 's/[^a-zA-Z0-9_/]//g'` >> $GITHUB_ENV | ||
- name: Get Develop instance database name | ||
run: echo 'DATABASE_NAME='`ssh $DEVELOP_SSH_USERNAME@$DEVELOP_HOST grep "db_name" /web/${{ env.BRANCH_CLEAN }}/config_override.php | sed "s/.*=.'//g" | sed "s/';.*//g"` >> $GITHUB_ENV | ||
- name: Set current date as env variable | ||
run: echo 'NOW='$(date +'%Y-%m-%d %H:%M:%S') >> $GITHUB_ENV | ||
- name: echo environment variables | ||
run: echo ${{ env }} | ||
- name: Update develop instance | ||
run: ssh $DEVELOP_SSH_USERNAME@$DEVELOP_HOST "test -e /web/${{ env.BRANCH_CLEAN }}" && (echo "Directory branch exists" && ssh $DEVELOP_SSH_USERNAME@$DEVELOP_HOST "cd /web/${{ env.BRANCH_CLEAN }} && git stash && git pull && wget --delete-after --no-check-certificate https://develop.sinergiacrm.org/${{ env.BRANCH_CLEAN }}/SticRepair.php && rm -rf /web/${{ env.BRANCH_CLEAN }}/cache" && wget --delete-after --no-check-certificate https://develop.sinergiacrm.org/${{ env.BRANCH_CLEAN }}) || echo "Branch doesn't exist in develop" | ||
- name: Create or Edit PR comment | ||
uses: thollander/actions-comment-pull-request@v1 | ||
with: | ||
message: | | ||
Actions executed at: ${{ env.NOW }}. | ||
comment_includes: 'Actions executed at:' | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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,57 @@ | ||
name: Add PR to project updates | ||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
branches: | ||
- 'master' | ||
jobs: | ||
track_pr: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Get project data | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
ORGANIZATION: SinergiaTIC | ||
PROJECT_NUMBER: 2 | ||
run: | | ||
gh api graphql -f query=' | ||
query($org: String!, $number: Int!) { | ||
organization(login: $org){ | ||
projectV2(number: $number) { | ||
id | ||
fields(first:20) { | ||
nodes { | ||
... on ProjectV2Field { | ||
id | ||
name | ||
} | ||
... on ProjectV2SingleSelectField { | ||
id | ||
name | ||
options { | ||
id | ||
name | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}' -f org=$ORGANIZATION -F number=$PROJECT_NUMBER > project_data.json | ||
echo 'PROJECT_ID='$(jq '.data.organization.projectV2.id' project_data.json) >> $GITHUB_ENV | ||
- name: Add PR to project updates | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
PR_ID: ${{ github.event.pull_request.node_id }} | ||
run: | | ||
item_id="$( gh api graphql -f query=' | ||
mutation($project:ID!, $pr:ID!) { | ||
addProjectV2ItemById(input: {projectId: $project, contentId: $pr}) { | ||
item { | ||
id | ||
} | ||
} | ||
}' -f project=$PROJECT_ID -f pr=$PR_ID --jq '.data.addProjectV2ItemById.item.id')" | ||
echo 'ITEM_ID='$item_id >> $GITHUB_ENV |
Oops, something went wrong.