diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 685b5d3..a8db63a 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -17,11 +17,17 @@ updates: directory: / schedule: interval: daily + commit-message: + prefix: chore + include: scope # Docker base images - package-ecosystem: docker directory: /src/s-core-devcontainer/.devcontainer schedule: interval: daily + commit-message: + prefix: chore + include: scope groups: all-in-one: patterns: @@ -34,3 +40,6 @@ updates: directory: / schedule: interval: daily + commit-message: + prefix: chore + include: scope diff --git a/.github/workflows/pr-title-semantic.yaml b/.github/workflows/pr-title-semantic.yaml new file mode 100644 index 0000000..7a33211 --- /dev/null +++ b/.github/workflows/pr-title-semantic.yaml @@ -0,0 +1,70 @@ +# ******************************************************************************* +# Copyright (c) 2026 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0 +# +# SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************* +name: Validate PR Title +description: This workflow validates pull request titles against semantic conventions. +on: + pull_request_target: + types: + - opened + - edited + - reopened + - synchronize +permissions: + pull-requests: read +jobs: + semantic-pr-title: + name: Semantic PR Title + runs-on: ubuntu-slim + steps: + - name: Validate PR title + uses: amannn/action-semantic-pull-request@v6 + id: lint_pr_title + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + # Allowed title types according to conventional commit semantics. + types: | + feat + fix + docs + style + refactor + perf + test + build + ci + chore + revert + requireScope: false + - uses: marocchino/sticky-pull-request-comment@v3 + # When the previous steps fails, the workflow would stop. By adding this + # condition you can continue the execution with the populated error message. + if: always() && (steps.lint_pr_title.outputs.error_message != null) + with: + header: pr-title-lint-error + message: | + Hey there and thank you for opening this pull request! 👋🏼 + + We require pull request titles to follow the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/) and it looks like your proposed title needs to be adjusted. + + Details: + + ``` + ${{ steps.lint_pr_title.outputs.error_message }} + ``` + # Delete a previous comment when the issue has been resolved + - if: ${{ steps.lint_pr_title.outputs.error_message == null }} + uses: marocchino/sticky-pull-request-comment@v3 + with: + header: pr-title-lint-error + delete: true