-
Notifications
You must be signed in to change notification settings - Fork 1
fix: corrige SonarCloud e adiciona delete automático de branch após merge #93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
7f72249
e9bb1a4
d779679
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| name: 🗑️ Delete Branch on Merge | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: [closed] | ||
| branches: [main] | ||
|
|
||
| jobs: | ||
| delete-merged-branch: | ||
| name: 🗑️ Delete merged branch | ||
| runs-on: ubuntu-latest | ||
| if: | | ||
| github.event.pull_request.merged == true && | ||
| github.event.pull_request.head.repo.full_name == github.repository | ||
| permissions: | ||
| contents: write | ||
|
|
||
| steps: | ||
| - name: 📥 Checkout | ||
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7 | ||
|
|
||
| - name: 🗑️ Delete merged branch | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: | | ||
| BRANCH_NAME="${{ github.event.pull_request.head.ref }}" | ||
|
Check failure on line 26 in .github/workflows/delete-branch-on-merge.yml
|
||
|
|
||
| # Protect default and release branches | ||
| case "$BRANCH_NAME" in | ||
| main|develop|master|releases/*) | ||
| echo "⚠️ Protected branch '$BRANCH_NAME' will not be deleted." | ||
| exit 0 | ||
| ;; | ||
| esac | ||
|
|
||
| echo "🗑️ Deleting merged branch: $BRANCH_NAME" | ||
| gh api "repos/${{ github.repository }}/git/refs/heads/${BRANCH_NAME}" --method DELETE \ | ||
| || echo "⚠️ Could not delete branch '$BRANCH_NAME' (already removed or from a fork)." | ||
| echo "✅ Branch '$BRANCH_NAME' cleanup completed." | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📝 Info: SonarQube result not reflected in security-summary despite skipped detection attempt The (Refers to line 167) Was this helpful? React with 👍 or 👎 to provide feedback. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 Info: Qodana step id added but never referenced
The
id: qodanawas added at.github/workflows/code-quality.yml:29alongsidecontinue-on-error: true, but no subsequent step referencessteps.qodana.outcome/conclusion. Withcontinue-on-error: true, the Qodana job will now report success even when the scan finds issues above--fail-threshold,0, so thequality-summarytable (needs.qodana.result) will showsuccessrather thanfailure. This aligns with the stated intent to prevent baseline/threshold failures from blocking the pipeline, but the added step id is currently unused.Was this helpful? React with 👍 or 👎 to provide feedback.