Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ArtARTs36/php-merge-request-linter
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.16.1
Choose a base ref
...
head repository: ArtARTs36/php-merge-request-linter
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Showing 470 changed files with 8,001 additions and 3,552 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish_docs.yml
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ jobs:
- name: Setup PHP with PECL extension
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: '8.2'
extensions: xdebug

- name: Cache Composer packages
5 changes: 5 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -9,6 +9,11 @@ jobs:
steps:
- uses: actions/checkout@master

- name: Setup PHP with PECL extension
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'

- name: Get release
id: get_release
uses: bruceadams/get-release@v1.3.2
4 changes: 3 additions & 1 deletion .github/workflows/review.yml
Original file line number Diff line number Diff line change
@@ -12,6 +12,8 @@ on:
jobs:
review:

if: github.actor != 'dependabot[bot]'

runs-on: ubuntu-latest

steps:
@@ -20,7 +22,7 @@ jobs:
- name: Setup PHP with PECL extension
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: '8.2'
extensions: xdebug

- name: Cache Composer packages
18 changes: 18 additions & 0 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Security

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
security:
name: Local PHP Security Checker
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Local PHP Security Checker
uses: docker://pplotka/local-php-security-checker-github-actions
6 changes: 3 additions & 3 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
@@ -2,9 +2,9 @@ name: Testing

on:
push:
branches: [ master, 'dev' ]
branches: [ master ]
pull_request:
branches: [ master, 'dev' ]
branches: [ master ]

jobs:
testing:
@@ -17,7 +17,7 @@ jobs:
- name: Setup PHP with PECL extension
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: '8.2'
extensions: xdebug

- name: Validate composer.json
44 changes: 23 additions & 21 deletions .mr-linter.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,29 @@
rules:
"@mr-linter/has_any_labels_of":
"@mr-linter/has_any_labels":
labels:
- Feature
- Bug
- Docs
- Tests
- Optimization

"@mr-linter/description_template":
- definition: description must have list of features
template: |
## Added
{text_multiline}
when:
labels:
has: "Feature"

- definition: description must have list of fixed bugs
template: |
## Fixed
{text_multiline}
when:
labels:
has: "Bug"

"@mr-linter/title_must_starts_with_any_prefix":
prefixes:
- '[Feature]'
@@ -17,7 +34,7 @@ rules:

"@mr-linter/description_not_empty": {}

"@mr-linter/update_changelog":
"@mr-linter/changelog_has_new_release":
when:
targetBranch:
equals: "master"
@@ -53,27 +70,12 @@ rules:
sourceBranch:
isKebabCase: true

- definition: "Labels must be in StudlyCase"
- definition: "Split feature / bug PR"
rules:
labels:
$all:
isStudlyCase: true

- definition: "Description must have list of fixed bugs"
rules:
descriptionMarkdown:
containsHeading2: "Fixed"
when:
labels:
has: "Bug"

- definition: "Description must have list of features"
rules:
descriptionMarkdown:
containsHeading2: "Added"
when:
labels:
has: "Feature"
notIntersect:
- Feature
- Bug

notifications:
channels:
167 changes: 157 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -4,14 +4,162 @@ This file contains changelogs.

[View all Releases](https://github.com/ArtARTs36/php-merge-request-linter/releases)

## [Unreleased](https://github.com/ArtARTs36/php-merge-request-linter/compare/0.20.2..master)

## [v0.21.0 (2023-09-26)](https://github.com/ArtARTs36/php-merge-request-linter/compare/0.20.2..0.21.0)

### Removed
* Removed Rule `@mr-linter/has_all_labels`
* Removed unnecessary polyfills

### Changed
* Catch exception on non-exists notification messenger

[💾 Assets](https://github.com/ArtARTs36/php-merge-request-linter/releases/tag/0.21.0)

-----------------------------------------------------------------

## [v0.20.2 (2023-09-13)](https://github.com/ArtARTs36/php-merge-request-linter/compare/0.20.1..0.20.2)

### Added
* Added evaluator `isNumber`
* Added evaluator `containsNumber`

[💾 Assets](https://github.com/ArtARTs36/php-merge-request-linter/releases/tag/0.20.2)

-----------------------------------------------------------------

## [v0.20.1 (2023-09-12)](https://github.com/ArtARTs36/php-merge-request-linter/compare/0.20.0..0.20.1)

### Fixed
* Fixed rule "@mr-linter/has_any_labels" on empty labels

[💾 Assets](https://github.com/ArtARTs36/php-merge-request-linter/releases/tag/0.20.1)

-----------------------------------------------------------------

## [v0.20.0 (2023-09-12)](https://github.com/ArtARTs36/php-merge-request-linter/compare/0.19.1..0.20.0)

### Added
* Added Rule `@mr-linter/description_template` for check description on defined template

### Removed
* Removed rule `@mr-linter/has_any_labels_of`

[💾 Assets](https://github.com/ArtARTs36/php-merge-request-linter/releases/tag/0.20.0)

-----------------------------------------------------------------

## [v0.19.1 (2023-09-12)](https://github.com/ArtARTs36/php-merge-request-linter/compare/0.19.0..0.19.1)

### Added
* Added an Evaluator `notIntersect` to check that the array does not intersect with the user array.

[💾 Assets](https://github.com/ArtARTs36/php-merge-request-linter/releases/tag/0.19.1)

-----------------------------------------------------------------

## [v0.19.0 (2023-09-11)](https://github.com/ArtARTs36/php-merge-request-linter/compare/0.18.1..0.19.0)

### Added
* Added Rule `@mr-linter/changelog_has_new_release` on contains new release

### Removed
* Removed Rule `@mr-linter/update_changelog`

[💾 Assets](https://github.com/ArtARTs36/php-merge-request-linter/releases/tag/0.19.0)

-----------------------------------------------------------------

## [v0.18.1 (2023-09-04)](https://github.com/ArtARTs36/php-merge-request-linter/compare/0.18.0..0.18.1)

### Added
* Resolve rule params with default value

[💾 Assets](https://github.com/ArtARTs36/php-merge-request-linter/releases/tag/0.18.1)

-----------------------------------------------------------------

## [v0.18.0 (2023-09-03)](https://github.com/ArtARTs36/php-merge-request-linter/compare/0.17.1..0.18.0)

### Added
* Added parameter `projectCodes` for rules `@mr-linter/branch_starts_with_task_number`, `@mr-linter/jira/has_issue_link`, `@mr-linter/title_starts_with_task_number`, `@mr-linter/youtrack/has_issue_link` for allow many specified project codes and any project code if parameter 'projectCodes' is empty

### Breaking changes
* Rule **@mr-linter/branch_starts_with_task_number**: removed parameter `projectName`
* Rule **@mr-linter/jira/has_issue_link**: removed parameter `projectCode`
* Rule **@mr-linter/title_starts_with_task_number**: removed parameter `projectName`
* Rule **@mr-linter/youtrack/has_issue_link**: removed parameter `projectCode`

### Internal
* Removed `ClassSummary`

[💾 Assets](https://github.com/ArtARTs36/php-merge-request-linter/releases/tag/0.18.0)

-----------------------------------------------------------------

## [v0.17.1 (2023-09-02)](https://github.com/ArtARTs36/php-merge-request-linter/compare/0.17.0..0.17.1)

### Added
* Added param `task` to `title_conventional` rule for checking if title contains task number

[💾 Assets](https://github.com/ArtARTs36/php-merge-request-linter/releases/tag/0.17.1)

-----------------------------------------------------------------

## [v0.17.0 (2023-08-30)](https://github.com/ArtARTs36/php-merge-request-linter/compare/0.16.4..0.17.0)

### Optimized
* Updated PHP to 8.2
* Deleted unless dependency "jetbrains/phpstorm-attributes"

[💾 Assets](https://github.com/ArtARTs36/php-merge-request-linter/releases/tag/0.17.0)

-----------------------------------------------------------------

## [v0.16.4 (2023-08-29)](https://github.com/ArtARTs36/php-merge-request-linter/compare/0.16.3..0.16.4)

### Added
* Throw exception when github actions token is empty
* Throw exception when gitlab token is empty

### Optimized
* Reduced docker image size

### Docs
* Updated rules doc page

### Internal
* Bump `guzzlehttp/psr7` from `2.4.3` to `2.4.5`

[💾 Assets](https://github.com/ArtARTs36/php-merge-request-linter/releases/tag/0.16.4)

-----------------------------------------------------------------

## [v0.16.3 (2023-08-29)](https://github.com/ArtARTs36/php-merge-request-linter/compare/0.16.2..0.16.3)

### Added
* Added rule `title_conventional`

[💾 Assets](https://github.com/ArtARTs36/php-merge-request-linter/releases/tag/0.16.3)

-----------------------------------------------------------------

## [v0.16.2 (2023-08-29)](https://github.com/ArtARTs36/php-merge-request-linter/compare/0.16.1..0.16.2)

### Optimized
* Throw http exceptions and catch their in CI requests

[💾 Assets](https://github.com/ArtARTs36/php-merge-request-linter/releases/tag/0.16.2)

-----------------------------------------------------------------

## [v0.16.1 (2023-08-13)](https://github.com/ArtARTs36/php-merge-request-linter/compare/0.16.0..0.16.1)

## Added
### Added
* Support GitLab CI job token

## Fixed
### Fixed
* Fixed phar on "TwigTest not found"

[💾 Assets](https://github.com/ArtARTs36/php-merge-request-linter/releases/tag/0.16.1)
@@ -20,7 +168,7 @@ This file contains changelogs.

## [v0.16.0 (2023-08-06)](https://github.com/ArtARTs36/php-merge-request-linter/compare/0.15.3..0.16.0)

## Added
### Added
* Added comments with lint result for merge requests

[💾 Assets](https://github.com/ArtARTs36/php-merge-request-linter/releases/tag/0.16.0)
@@ -29,7 +177,7 @@ This file contains changelogs.

## [v0.15.3 (2023-07-29)](https://github.com/ArtARTs36/php-merge-request-linter/compare/0.15.2..0.15.3)

## Added
### Added
* Added "no ssh keys" rule to prevent ssh keys from being included in the merge request.
* Added "disable file extensions" rule to disable adding files of certain extensions.

@@ -39,7 +187,7 @@ This file contains changelogs.

## [v0.15.2 (2023-07-29)](https://github.com/ArtARTs36/php-merge-request-linter/compare/0.15.1..0.15.2)

## Optimization
### Optimization
* Add diff fragments for fast search in changes

[💾 Assets](https://github.com/ArtARTs36/php-merge-request-linter/releases/tag/0.15.2)
@@ -48,7 +196,7 @@ This file contains changelogs.

## [v0.15.1 (2023-07-27)](https://github.com/ArtARTs36/php-merge-request-linter/compare/0.15.0..0.15.1)

## Added
### Added
* Added Rule "diff limit"
* Added examples for params of rules

@@ -77,12 +225,11 @@ This file contains changelogs.

[💾 Assets](https://github.com/ArtARTs36/php-merge-request-linter/releases/tag/0.14.1)


-----------------------------------------------------------------

## [v0.14.0 (2023-05-27)](https://github.com/ArtARTs36/php-merge-request-linter/compare/0.13.1..0.14.0)

## Added
### Added
* Suppress error on non-critical rules via rule option `critical: false`
* Added option `stop_on_failure` for stop linter on first failure
* Added option `stop_on_warning` for stop linter on first warning
@@ -133,7 +280,7 @@ This file contains changelogs.
* Add logs for HTTP Client
* Validate BitBucket PR data

## Changed
### Internal
* Update PHPStan level to 9

[💾 Assets](https://github.com/ArtARTs36/php-merge-request-linter/releases/tag/0.12.0)
@@ -195,7 +342,7 @@ This file contains changelogs.
### Internal
* Refactored condition evaluator resolving
* 🚀 Up test coverage to 40.21%
* Add dependency **psr/clock**
* Added dependency **psr/clock**

[💾 Assets](https://github.com/ArtARTs36/php-merge-request-linter/releases/tag/0.9.0)

6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
FROM php:8.1
FROM php:8.2-alpine

RUN apt update && apt install -y git zip
RUN apk add --update git zip gcc libc-dev autoconf make && rm -rf /var/cache/apk/*

RUN pecl install pcov && docker-php-ext-enable pcov

COPY --from=composer:2.4.0 /usr/bin/composer /usr/bin/composer

Loading