-
Notifications
You must be signed in to change notification settings - Fork 5
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
b319f28
commit 19315a8
Showing
8 changed files
with
224 additions
and
11 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
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 |
---|---|---|
|
@@ -8,7 +8,7 @@ on: | |
# types: [opened, closed, reopened] | ||
|
||
jobs: | ||
build: | ||
build-dashboard: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
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,44 @@ | ||
name: Mística AI Discussions | ||
|
||
permissions: | ||
contents: read | ||
pull-requests: write | ||
|
||
on: | ||
discussion: | ||
types: [created, edited] | ||
|
||
concurrency: | ||
group: ${{ github.repository }}-${{ github.event.number || github.head_ref || github.sha }}-${{ github.workflow }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
chatgpt: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: platisd/openai-pr-description@master | ||
with: | ||
github_token: ${{ secrets.NOVUM_PRIVATE_REPOS }} | ||
openai_api_key: ${{ secrets.OPENAI_API_KEY }} | ||
sample_prompt: | | ||
It acts as the person who will decide whether a design requirement should enter into an overall design system and complies with the following rules: | ||
1. The requirement must be global, i.e. it must work outside the product and/or business logic. It should be as agnostic as possible. | ||
2. It must be scalable to another type of product. | ||
3. It should work for mobile and desktop environments | ||
4. That it is multi-brand | ||
sample_response: | | ||
Base on rules that Mística defines, evaluate the proposal with the following requirements: | ||
1. The requirement must be global, i.e. it must work outside the product and/or business logic. It should be as agnostic as possible. | ||
2. It must be scalable to another type of product. | ||
3. It should work for mobile and desktop environments | ||
4. That it is multi-brand | ||
- name: Add comment to discussion | ||
run: | | ||
curl -X POST \ | ||
-H "Authorization: Bearer ${{ secrets.NOVUM_PRIVATE_REPOS }}" \ | ||
-H "Accept: application/vnd.github.v3+json" \ | ||
https://api.github.com/repos/{owner}/{repo}/discussions/{discussion_number}/comments \ | ||
--data-raw '{"body": "Generated response: ${description}"}' | ||
env: | ||
description: ${{ steps.openai-pr-description.outputs.response }} |
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,73 @@ | ||
name: Pending tasks in issues | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
pending-tasks: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout del repositorio | ||
uses: actions/checkout@v2 | ||
|
||
- name: Configurar Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.x # Especifica la versión de Python que necesites | ||
|
||
- name: Instalar dependencias | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install PyGithub | ||
- name: Ejecutar script de búsqueda | ||
env: | ||
TOKEN: ${{ secrets.NOVUM_PRIVATE_REPOS }} | ||
run: | | ||
python - <<EOF | ||
import os | ||
from github import Github | ||
TOKEN = os.environ['TOKEN'] | ||
# Nombre de usuario y nombre del repositorio | ||
OWNER = 'Telefonica' | ||
REPO = 'mistica-design' | ||
# URL base del repositorio | ||
REPO_URL = f'https://github.com/{OWNER}/{REPO}' | ||
# Crea una instancia de la clase Github usando tu token de acceso | ||
g = Github(TOKEN) | ||
# Obtiene el repositorio | ||
repo = g.get_repo(f'{OWNER}/{REPO}') | ||
# Busca las issues cerradas en el repositorio | ||
closed_issues = repo.get_issues(state='closed') | ||
# Lista para almacenar las issues con checkboxes desactivados | ||
issues_con_checkboxes_desactivados = [] | ||
# Itera sobre las issues cerradas | ||
for issue in closed_issues: | ||
# Verifica que el cuerpo de la issue no sea None | ||
if issue.body is not None and '- [ ]' in issue.body: | ||
issues_con_checkboxes_desactivados.append(issue) | ||
continue | ||
# Obtiene los comentarios de la issue | ||
comments = issue.get_comments() | ||
# Busca checkboxes desactivados en los comentarios | ||
for comment in comments: | ||
if '- [ ]' in comment.body: | ||
issues_con_checkboxes_desactivados.append(issue) | ||
break | ||
# Imprime el listado de issues con checkboxes desactivados | ||
print("Issues con checkboxes desactivados:") | ||
for issue in issues_con_checkboxes_desactivados: | ||
issue_url = f'{REPO_URL}/issues/{issue.number}' | ||
print(f"Issue #{issue.number}: {issue.title} ({issue_url})") | ||
EOF |
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,92 @@ | ||
name: Screenshot test | ||
|
||
# push: | ||
# paths: | ||
# - ".github/workflows/figma-export.yml" | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
branchID: | ||
description: "Put Figma BranchID to generate screenshot testing" | ||
required: true | ||
|
||
env: | ||
FIGMA_TOKEN: ${{ secrets.FIGMA_TOKEN}} | ||
|
||
jobs: | ||
screenshot-test: | ||
name: Acceptance tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Checkout branch or create new one | ||
run: | | ||
git fetch | ||
if git branch -a | grep origin/acceptance-tests; then | ||
git checkout acceptance-tests | ||
else | ||
git checkout -b acceptance-tests | ||
fi | ||
- name: Instalar Homebrew | ||
run: | | ||
sudo apt-get install -y librsvg2-bin | ||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | ||
- name: Update master to last version | ||
run: npx -p @figma-export/cli -p @figma-export/output-components-as-svg figma-export components WCkDDzlXE16R6yXaljxddj -O @figma-export/output-components-as-svg | ||
|
||
- name: convert-svg2png | ||
run: | | ||
find output -type f -name "*.svg" -exec rsvg-convert --dpi-x=200 --dpi-y=200 {} -o {}.png \; | ||
find output -type f -name "*.svg" -exec rm -f {} \; | ||
- name: Check if there are any changes | ||
id: verify_diff | ||
run: | | ||
git diff --quiet . || echo "changed=true" >> $GITHUB_OUTPUT | ||
- name: Commit & Push | ||
if: steps.verify_diff.outputs.changed == 'true' | ||
run: | | ||
git config user.name "github-actions" | ||
git config user.email "github-actions[bot]@users.noreply.github.com" | ||
git add . | ||
git commit -m "Screenshot tests from master" | ||
git push origin acceptance-tests | ||
- name: Checkout branch or create new one | ||
run: | | ||
git fetch | ||
if git branch -a | grep origin/${{ github.event.inputs.branchID }}; then | ||
git checkout ${{ github.event.inputs.branchID }} | ||
else | ||
git checkout -b ${{ github.event.inputs.branchID }} | ||
fi | ||
- name: Export new screenshots | ||
run: npx -p @figma-export/cli -p @figma-export/output-components-as-svg figma-export components ${{ github.event.inputs.branchID }} -O @figma-export/output-components-as-svg | ||
|
||
- name: convert-svg2png | ||
run: | | ||
find output -type f -name "*.svg" -exec rsvg-convert --dpi-x=200 --dpi-y=200 {} -o {}.png \; | ||
find output -type f -name "*.svg" -exec rm -f {} \; | ||
- name: Commit & Push | ||
run: | | ||
git config user.name "github-actions" | ||
git config user.email "github-actions[bot]@users.noreply.github.com" | ||
git add . | ||
git commit -m "Screenshot tests from ${{ github.event.inputs.branchID }}" | ||
git push origin ${{ github.event.inputs.branchID }} | ||
- name: Create Pull-Request | ||
uses: repo-sync/pull-request@v2 | ||
with: | ||
source_branch: ${{ github.event.inputs.branchID }} | ||
destination_branch: "acceptance-tests" | ||
pr_title: "Acceptance tests for ${{ github.event.inputs.branchID }} file" | ||
pr_draft: true | ||
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