diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index d68e415..dc3f2a8 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -65,6 +65,17 @@ Se qualquer pré-condição falhar, não executar a ação; informe o usuário e **Sempre execute comandos `gh` de modo que o output seja exibido diretamente no terminal.** +#### ⚠️ REGRA IMPORTANTE: Output de Comandos gh + +**TODOS os comandos `gh` que geram output devem terminar com `| cat` para evitar output interativo/pagers!** + +- ✅ **CERTO:** `gh pr list --json number,title | cat` +- ❌ **ERRADO:** `gh pr list --json number,title` (pode travar) +- ✅ **CERTO:** `gh api repos/owner/repo | cat` +- ❌ **ERRADO:** `gh api repos/owner/repo` (pode travar) + +**Exceção:** Comandos interativos como `gh pr create` não precisam de `| cat`. + #### 📊 Para comandos que retornam dados estruturados: - **SEMPRE** redirecione para arquivo temporário @@ -77,9 +88,10 @@ Se qualquer pré-condição falhar, não executar a ação; informe o usuário e - Execute diretamente no terminal - Exemplos: `gh pr create`, `gh pr edit`, `gh pr merge`, `gh repo clone` -- **Para TODAS as PRs**: Crie temporariamente um arquivo `.md` com a descrição completa e use `--body-file arquivo.md` para `gh pr create` ou `gh pr edit` +- **🚨 REGRA OBRIGATÓRIA PARA PRS**: **SEMPRE** crie um arquivo `.md` temporário com a descrição completa e use `--body-file arquivo.md` para `gh pr create` ou `gh pr edit` - **Como criar arquivos temporários**: Use a ferramenta `create_file` diretamente ao invés de comandos no terminal com `EOF` para manter o terminal limpo - **Exemplo**: Crie `pr_description.md` usando `create_file`, depois use `--body-file pr_description.md` +- **❌ PROIBIDO**: Passar corpo da PR inline no comando (evita comandos gigantes e ilegíveis) #### 🧹 Limpeza: @@ -181,8 +193,9 @@ git push -u origin feature/nome-da-feature - ✅ Só faça merge após revisão e aprovação **A branch \`main\` está protegida e só aceita merges de:** -- Branches \`release/*\` -- Branches \`hotfix/*\` + +- Branches \`release/\*\` +- Branches \`hotfix/\*\` ### 📝 Documentação diff --git a/.github/workflows/production.yml b/.github/workflows/production.yml index 7c02146..5050553 100644 --- a/.github/workflows/production.yml +++ b/.github/workflows/production.yml @@ -47,10 +47,10 @@ jobs: pull-requests: write steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: fetch-depth: 0 - token: ${{ secrets.GH_PAT_FOR_RELEASE }} + persist-credentials: false - name: Setup pnpm uses: pnpm/action-setup@v4 @@ -64,11 +64,7 @@ jobs: - name: Install dependencies run: pnpm install --frozen-lockfile - - name: Run Semantic Release + - name: Semantic Release + uses: cycjimmy/semantic-release-action@v5 env: - GITHUB_TOKEN: ${{ secrets.GH_PAT_FOR_RELEASE }} - GIT_AUTHOR_NAME: github-actions[bot] - GIT_AUTHOR_EMAIL: github-actions[bot]@users.noreply.github.com - GIT_COMMITTER_NAME: github-actions[bot] - GIT_COMMITTER_EMAIL: github-actions[bot]@users.noreply.github.com - run: pnpm exec semantic-release \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GH_PAT_FOR_RELEASE }} \ No newline at end of file diff --git a/.github/workflows/sync-main-to-develop.yml b/.github/workflows/sync-main-to-develop.yml index 9518c28..4bfd5d9 100644 --- a/.github/workflows/sync-main-to-develop.yml +++ b/.github/workflows/sync-main-to-develop.yml @@ -28,8 +28,8 @@ jobs: - name: Configure Git User run: | - git config --global user.name "github-actions[bot]" - git config --global user.email "bot@users.noreply.github.com" + git config --global user.name "mrdeveloper-bot" + git config --global user.email "bot@mrdeveloper.dev" - name: Merge main into sync branch and push id: merge @@ -71,7 +71,7 @@ jobs: fi # Continua o fluxo e força o push da branch, seja ela com merge limpo ou com conflitos. - git push --force https://github-actions[bot]:${GH_PAT}@github.com/${GITHUB_REPOSITORY}.git HEAD:$BRANCH_NAME + git push --force https://${GH_PAT}@github.com/${GITHUB_REPOSITORY}.git HEAD:$BRANCH_NAME - name: Create or Update Pull Request if: steps.merge.outputs.sync_needed == 'true' diff --git a/CHANGELOG.md b/CHANGELOG.md index 328c89c..659eb08 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,14 @@ -## [1.2.4](https://github.com/JaegerCaiser/mrdeveloper/compare/v1.2.3...v1.2.4) (2025-11-06) +# [1.3.0-beta.1](https://github.com/JaegerCaiser/mrdeveloper/compare/v1.2.3...v1.3.0-beta.1) (2025-11-07) ### Bug Fixes -* **ci:** add always-run job for required checks on documentation PRs ([03b71ab](https://github.com/JaegerCaiser/mrdeveloper/commit/03b71ab0a866135f0df121e7a203575bc3146b48)) +* correct sync workflow to use PAT instead of GitHub App ([722aa49](https://github.com/JaegerCaiser/mrdeveloper/commit/722aa49d5eda30f440cf238a2cd049103335900c)) + + +### Features + +* replace semantic-release with cycjimmy/semantic-release-action ([98d8f0f](https://github.com/JaegerCaiser/mrdeveloper/commit/98d8f0f079d3fd673daaf0ff2e13208fa172d58c)) ## [1.2.3](https://github.com/JaegerCaiser/mrdeveloper/compare/v1.2.2...v1.2.3) (2025-11-06) diff --git a/package.json b/package.json index b570b4b..8f192d4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mrdeveloper", - "version": "1.2.4", + "version": "1.3.0-beta.1", "type": "module", "packageManager": "pnpm@10.20.0", "homepage": "https://www.mrdeveloper.com.br/",