Skip to content

Commit

Permalink
ci: commit linting workflow
Browse files Browse the repository at this point in the history
Add commit linting workflow and PR title check.
  • Loading branch information
vcastellm committed Jun 20, 2024
1 parent 86c2fe7 commit 726a433
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 53 deletions.
39 changes: 0 additions & 39 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,5 @@
# Pull Request Template

## Description

Please include a summary of the change and which issue is fixed. Also, include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

## Type of change

Please delete options that are not relevant.

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update

## How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.

- [ ] Test A
- [ ] Test B

## Checklist:

Before you submit your pull request, please make sure you have completed the following:

- [ ] I have followed the [contributing guidelines](CONTRIBUTING.md).
- [ ] My code follows the style guidelines of this project and I have run `lint` to ensure the code style is valid
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes

## Screenshots (if appropriate):

Include any screenshots that will help explain your changes.

## Additional context

Add any other context about the pull request here.
31 changes: 31 additions & 0 deletions .github/workflows/lint-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Checking PR semantic

on:
pull_request:
types: [opened, synchronize, reopened]

permissions:
contents: read
pull-requests: read
statuses: write

jobs:
title:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
ignoreLabels: |
release
commits:
name: Validate PR commits
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v6
2 changes: 1 addition & 1 deletion .github/workflows/security-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Security Build
on:
push:
branches:
- master # or the name of your main branch
- main # or the name of your main branch
workflow_dispatch: {}
pull_request:
types: [opened, synchronize, reopened]
Expand Down
14 changes: 1 addition & 13 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,14 +1,2 @@
sonar.projectKey=<REPLACE WITH PROJECT KEY PROVIDED BY SONARCLOUD>
sonar.projectKey=0xPolygon_cdk
sonar.organization=0xpolygon

# This is the name and version displayed in the SonarCloud UI.
#sonar.projectName=cdk-validium-node
#sonar.projectVersion=1.0


# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
#sonar.sources=.
#sonar.exclusions=.

# Encoding of the source code. Default is default system encoding
#sonar.sourceEncoding=UTF-8

0 comments on commit 726a433

Please sign in to comment.