Skip to content

Commit

Permalink
Merge branch 'trunk' of github.com:Automattic/action-required-review …
Browse files Browse the repository at this point in the history
…into trunk
  • Loading branch information
pasqualesalza committed Nov 8, 2024
2 parents 53c2e49 + 18f0315 commit f52bc44
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/files/autorelease.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ elif [[ "$GITHUB_REF" == "refs/heads/trunk" ]]; then
fi
ROLLING_MODE=true
CURRENT_VER=$( sed -nEe 's/^## \[?([^]]*)\]? - .*/\1/;T;p;q' CHANGELOG.md || true )
GIT_SUFFIX=$( git log -1 --format=%h . )
GIT_SUFFIX=$( git log -1 --format="%ct.g%h" . )
TAG="$CURRENT_VER+rolling.$GIT_SUFFIX"
else
echo "::error::Expected GITHUB_REF like \`refs/tags/v1.2.3\` or \`refs/tags/1.2.3\` or \`refs/heads/trunk\` for rolling releases, got \`$GITHUB_REF\`"
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [4.0.2-alpha] - unreleased

This is an alpha version! The changes listed here are not final.

### Fixed
- Avoid trying to request reviews from bot accounts.

## [4.0.1] - 2024-08-29
### Changed
- Updated package dependencies. [#36757]
Expand Down Expand Up @@ -90,6 +97,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Initial release

[4.0.2-alpha]: https://github.com/Automattic/action-required-review/compare/v4.0.1...v4.0.2-alpha
[4.0.1]: https://github.com/Automattic/action-required-review/compare/v4.0.0...v4.0.1
[4.0.0]: https://github.com/Automattic/action-required-review/compare/v3.1.0...v4.0.0
[3.1.0]: https://github.com/Automattic/action-required-review/compare/v3.0.2...v3.1.0
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"license": "GPL-2.0-or-later",
"require": {},
"require-dev": {
"automattic/jetpack-changelogger": "^4.2.6"
"automattic/jetpack-changelogger": "^4.2.8"
},
"scripts": {
"build-development": [
Expand Down
4 changes: 3 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36056,7 +36056,9 @@ async function requestReviewer( teams ) {
const teamReviews = [];

for ( const t of teams ) {
if ( t.startsWith( '@' ) ) {
if ( t.startsWith( '@' ) && t.endsWith( '[bot]' ) ) {
core.info( `Skipping ${ t }, appears to be a bot` );
} else if ( t.startsWith( '@' ) ) {
userReviews.push( t.slice( 1 ) );
} else {
teamReviews.push( t );
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "required-review",
"version": "4.0.1",
"version": "4.0.2-alpha",
"description": "Check that a Pull Request has reviews from required teams.",
"main": "index.js",
"author": "Automattic",
Expand All @@ -17,5 +17,6 @@
},
"scripts": {
"build": "ncc build src/main.js -o dist --source-map --license licenses.txt"
}
},
"packageManager": "[email protected]+sha512.cce0f9de9c5a7c95bef944169cc5dfe8741abfb145078c0d508b868056848a87c81e626246cb60967cbd7fd29a6c062ef73ff840d96b3c86c40ac92cf4a813ee"
}
4 changes: 3 additions & 1 deletion src/request-review.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ async function requestReviewer( teams ) {
const teamReviews = [];

for ( const t of teams ) {
if ( t.startsWith( '@' ) ) {
if ( t.startsWith( '@' ) && t.endsWith( '[bot]' ) ) {
core.info( `Skipping ${ t }, appears to be a bot` );
} else if ( t.startsWith( '@' ) ) {
userReviews.push( t.slice( 1 ) );
} else {
teamReviews.push( t );
Expand Down

0 comments on commit f52bc44

Please sign in to comment.