Skip to content

Commit

Permalink
Zowe Suite v2.13.0
Browse files Browse the repository at this point in the history
  • Loading branch information
zowe-robot authored Nov 28, 2023
2 parents e17e379 + 5bc2894 commit a78b4a7
Show file tree
Hide file tree
Showing 15 changed files with 322 additions and 76 deletions.
84 changes: 84 additions & 0 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,90 @@ jobs:
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

update-changelog:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
outputs:
was_updated: ${{ steps.check-change.outputs.change_detected }}
check_commit: ${{ steps.check-changelog.outputs.check_commit }}
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
fetch-depth: 0

- name: Check for updated CHANGELOG.md using git
id: check-changelog
run: |
if git diff --name-only origin/${{ github.base_ref }} | grep -q "^CHANGELOG.md$"; then
echo "CHANGELOG.md has been updated."
echo "::set-output name=check_commit::true"
else
echo "ERROR: CHANGELOG.md has not been updated."
echo "::set-output name=check_commit::false"
fi
- name: Compare PR description with template
if: steps.check-changelog.outputs.check_commit == 'false'
env:
PR_DESCRIPTION: ${{ github.event.pull_request.body }}
run: |
# Safely print the PR description using Node.js
node -e "const fs=require('fs'); fs.writeFileSync('/tmp/pr_description.txt', process.env.PR_DESCRIPTION);"
# Use diff to compare the two files
if diff -wB /tmp/pr_description.txt .github/pull_request_template.md > /dev/null; then
echo "ERROR: PR description is identical to the template."
exit 1
else
echo "PR description and template are different."
fi
- name: Check PR body against changelog
if: steps.check-changelog.outputs.check_commit == 'false'
id: extract-changelog
run: |
result=$(node .github/workflows/set-changelog.js ${{ github.event.pull_request.number }})
if [ "$result" = "Success" ]; then
git config --global user.email "[email protected]"
git config --global user.name "Zowe Robot"
git add CHANGELOG.md
git commit -s -m "Update changelog with PR #${{ github.event.pull_request.number }} description"
git push
echo "Updated CHANGELOG from description"
else
echo $result
echo -e "No changelog and version information found in PR description. Please add them.\nExpected Format:\nVERSION:X.XX.X\nCHANGELOG:This is changelog note.\nTo re-run the action, just make a push or commit after updating the PR description or updating the changelog via a manual file changing commit."
exit 1
fi
- name: check for changes
id: check-change
run: |
if git diff --name-only HEAD^ HEAD | grep 'changelog.md'; then
echo "No Changes detected, setting flag to false"
echo "::set-output name=change_detected::false"
else
echo "::set-output name=change_detected::true"
fi
check_changelog:
if: github.event_name == 'pull_request'
needs: update-changelog
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Verify Changelog update
run: |
if [ "${{ needs.update-changelog.outputs.was_updated }}" != "true" ]; then
echo "CHANGELOG.md not updated, please update CHANGELOG.md with the changes made in the pull request"
exit 1
else
echo "changelog was updated successfully."
fi
build-test:
runs-on: ubuntu-latest
needs: check-permission
Expand Down
59 changes: 59 additions & 0 deletions .github/workflows/set-changelog.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/*
This program and the accompanying materials are
made available under the terms of the Eclipse Public License v2.0 which accompanies
this distribution, and is available at https://www.eclipse.org/legal/epl-v20.html
SPDX-License-Identifier: EPL-2.0
Copyright Contributors to the Zowe Project.
*/

const fs = require('fs');

// Must run with args: PR_NUMBER
const PR_NUMBER = process.argv[2];
const description = fs.readFileSync('/tmp/pr_description.txt', 'utf8');
let changelogMsg, version;

if (description.includes('VERSION:') && description.includes('CHANGELOG:')) {
let lines = description.split('\n');
lines.forEach((line) => {
if (line.startsWith('CHANGELOG:')) {
changelogMsg = line.substring('CHANGELOG:'.length).trim();
} else if (line.startsWith('VERSION:')) {
version = line.substring('VERSION:'.length).trim();
}
});

if (changelogMsg && version) {
let changelog = fs.readFileSync('CHANGELOG.md', 'utf8');
let changelogLines = changelog.split('\n');
let versionIndex = -1;
let anchorIndex = 0;
for (let i = 0; i < changelogLines.length; i++) {
if (changelogLines[i].includes('All notable changes to the ZSS package will be documented in this file.')) {
anchorIndex = i;
} else if (changelogLines[i].startsWith('## ' + version)) { // Removed "v" prefix
versionIndex = i;
break;
}
}
if (versionIndex != -1) {
changelogLines.splice(versionIndex + 2, 0, `- ${changelogMsg} (#${PR_NUMBER})`);
} else {
changelogLines.splice(anchorIndex + 1, 0, `\n## \`${version}\`\n- ${changelogMsg} (#${PR_NUMBER})`);
}
const newChangelog = changelogLines.join('\n');
fs.writeFileSync('CHANGELOG.md', newChangelog);
console.log('Success');
} else {
if (!changelogMsg) {
console.log('Missing CHANGELOG');
}
if (!version) {
console.log('Missing VERSION');
}
}
} else {
console.log('Missing CHANGELOG or VERSION');
}
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,16 @@

All notable changes to the ZSS package will be documented in this file.

## Recent Changes
## `2.13.0`
- Enhancement: Added support for using "zowe.network" and "components.zss.zowe.network" to set listener IP and TLS version properties. (#659)
- Enhancement: Added support for using "zowe.network" and "components.zss.zowe.network" to set cipher suites.
- Enhancement: Change pattern matching for keyrings to allow more types of keyrings in the future (#581)
- Enhancement: Consolidate JWK warnings into improved ZWES1606W message (#663)
- Bugfix: Corrected build environment file's use of IP address to github.com (#660)


## `2.10.0`
- This action making a CHANGELOG note via special syntax from the GitHub PR commit message, like it could automatically update CHANGELOG.md with the message. First job checks if PR body has changelog note or not if it's not there then it asked them to add it and second job is to check if changelog note has been added in changelog.md file or not. (#636)
- Bugfix: Datasets with VOLSER set to an MVS Symbol would cause dataset read, write, and metadata API calls to fail for those datasets. (#603)
- Bugfix: Preventing error code 0C9-09 caused by a block size of zero (#606)

Expand Down
4 changes: 2 additions & 2 deletions build/zis.proj.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PROJECT="zis"
VERSION=2.12.0
DYNLINK_PLUGIN_VERSION=5
VERSION=2.13.0
DYNLINK_PLUGIN_VERSION=6
DEPS=""
6 changes: 3 additions & 3 deletions build/zss.proj.env
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
PROJECT="zss"
VERSION=2.12.0
VERSION=2.13.0
DEPS="QUICKJS LIBYAML"

QUICKJS="quickjs"
QUICKJS_SOURCE="git@140.82.114.4:joenemo/quickjs-portable.git"
QUICKJS_SOURCE="git@github.com:joenemo/quickjs-portable.git"
QUICKJS_BRANCH="main"

LIBYAML="libyaml"
LIBYAML_SOURCE="git@140.82.114.4:yaml/libyaml.git"
LIBYAML_SOURCE="git@github.com:yaml/libyaml.git"
LIBYAML_BRANCH="0.2.5"
2 changes: 1 addition & 1 deletion c/datasetjson.c
Original file line number Diff line number Diff line change
Expand Up @@ -1575,7 +1575,7 @@ void updateDataset(HttpResponse* response, char* absolutePath, int jsonMode) {

if(returnCode == 0) {
int blockSize = 0x10000;
int maxBlockCount = (translationLength*2)/blockSize;
int maxBlockCount = (translationLength*4)/blockSize;
if (!maxBlockCount){
maxBlockCount = 0x10;
}
Expand Down
Loading

0 comments on commit a78b4a7

Please sign in to comment.