forked from neos/neos-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/9.0' into 90/timeable-node-visib…
…ility
- Loading branch information
Showing
155 changed files
with
1,810 additions
and
870 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
16.16 | ||
20.9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
#!/bin/bash | ||
|
||
# Check if the required parameters are provided | ||
if [ $# -ne 2 ]; then | ||
echo "Usage: $0 <JobID> <PullRequestNumber>" | ||
exit 1 | ||
fi | ||
|
||
# If no comment with recordings exists, create a new comment | ||
# create a function names createNewComment with the comment body as parameter | ||
|
||
function generateCommentBody() { | ||
# Split the JobID string into an array | ||
IFS=$'\n' read -r -d '' -a jobIdArray <<< "$jobIds" | ||
echo "Generate comment message for following JobIDs: ${jobIdArray[@]}" | ||
|
||
# Iterate over each JobID in the array | ||
for i in ${!jobIdArray[@]}; do | ||
iterator=$(($i+1)) | ||
jobId="${jobIdArray[$i]}" | ||
link="[Recording $iterator](https://app.saucelabs.com/rest/v1/jobs/$jobId/video.mp4)" | ||
videoRecordingsLinks+="\n* $link" | ||
done | ||
|
||
# Construct the comment with the latest acceptance test recordings | ||
# Construct the comment with the latest acceptance test recordings | ||
if [ -n "$videoRecordingsLinks" ]; then | ||
commentBody="🎥 **End-to-End Test Recordings**\n\n$videoRecordingsLinks\n\nThese videos demonstrate the end-to-end tests for the changes in this pull request." | ||
else | ||
# empty comment body to prevent a comment without recordings | ||
commentBody="" | ||
fi | ||
} | ||
|
||
# Check if a comment with recordings already exists | ||
function getExistingComment() { | ||
echo "Checking if a comment with recordings already exists..." | ||
existingComment=$(gh pr view --repo neos/neos-ui $pullRequestNumber --json comments | jq -r ".comments[] | select( .body | contains(\"End-to-End Test Recordings\"))") | ||
} | ||
|
||
function createComment() { | ||
echo "Creating new comment..." | ||
gh pr comment --repo neos/neos-ui $pullRequestNumber --body "$(printf "$commentBody")" | ||
} | ||
|
||
# If a comment with recordings exists, update the existing comment | ||
function updateComment() { | ||
# Note: The gh cli does not support editing comments yet, so we have to use the GitHub API directly | ||
echo "Updating existing comment..." | ||
commentUri=$(echo "$existingComment" | jq -r ".url") | ||
commentId=$(echo "$commentUri" | awk -F'#issuecomment-' '{print $2}') | ||
jsonBody=$(jq -n --arg str "$(printf "$commentBody")" '{"body": $str}') | ||
|
||
curl -s -H "Authorization: token $GH_TOKEN" \ | ||
-X PATCH -d "$jsonBody" \ | ||
"https://api.github.com/repos/neos/neos-ui/issues/comments/$commentId" | ||
} | ||
|
||
jobIds=$1 | ||
pullRequestNumber=$2 | ||
generateCommentBody | ||
getExistingComment | ||
|
||
echo "Existing comment: $existingComment" | ||
if [ -n "$existingComment" ]; then | ||
updateComment | ||
else | ||
createComment | ||
fi | ||
|
||
echo "Comment added to Pull Request #$pullRequestNumber with the latest acceptance test recordings." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ | |
|
||
/** | ||
* A trait to do easy backend module translations | ||
* @internal | ||
*/ | ||
trait TranslationTrait | ||
{ | ||
|
Oops, something went wrong.