Skip to content

Commit

Permalink
Merge pull request #142 from zowe/update-workflow-permissions-v3
Browse files Browse the repository at this point in the history
Update workflow permissions (v3)
  • Loading branch information
zFernand0 authored Sep 11, 2024
2 parents be65d9b + 379dc50 commit a08a64a
Show file tree
Hide file tree
Showing 31 changed files with 498 additions and 483 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ on:
- next
paths:
- packages/**
# schedule:
# - cron: '0 10 * * *'
schedule:
- cron: '0 10 * * *'

jobs:
audit:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/auto-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: Zowe CICS Client Auto Responder
on:
issues:
types: labeled
permissions:
issues: write

jobs:
processLabelAction:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ jobs:
if: github.event_name == 'push' && github.ref_protected
needs: test
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write

steps:
- name: Checkout
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/update-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ env:
PR_STATUS_DRAFT: 'In Progress'
PR_STATUS_READY: 'Review/QA'

permissions:
pull-requests: write

jobs:
update-project:
name: Move project item
Expand Down
121 changes: 101 additions & 20 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
"@types/yargs": "^17.0.24",
"@typescript-eslint/eslint-plugin": "^5.57.1",
"@typescript-eslint/parser": "^5.57.1",
"@zowe/cli-test-utils": "^8.0.0-next.202402021649",
"@zowe/imperative": "^8.0.0-next.202407311544",
"@zowe/cli-test-utils": "^8.0.0-next.202408301809",
"@zowe/imperative": "^8.0.0-next.202408301809",
"@zowe/zowe-explorer-api": "^3.0.0-next",
"chalk": "^4.1.2",
"eslint": "^8.37.0",
Expand Down
4 changes: 4 additions & 0 deletions packages/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to the IBM® CICS® Plug-in for Zowe CLI will be documented in this file.

## Recent Changes

- BugFix: Updated dependencies for technical currency. [#142](https://github.com/zowe/cics-for-zowe-client/pull/142)

## `6.0.0-next.202403042201`

- V3 Breaking: Increased Node Engine to 18.12.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*/

import { mockHandlerParameters } from "@zowe/cli-test-utils";
import { CommandProfiles, IHandlerParameters, IProfile, Session } from "@zowe/imperative";
import { IHandlerParameters, Session } from "@zowe/imperative";
import { ICMCIApiResponse } from "../../../../src";
import { CSDGroupDefinition } from "../../../../src/add-to-list/csdGroup/CSDGroup.definition";
import CSDGroupHandler from "../../../../src/add-to-list/csdGroup/CSDGroup.handler";
Expand All @@ -19,28 +19,25 @@ jest.mock("@zowe/cics-for-zowe-sdk");
const AddToList = require("@zowe/cics-for-zowe-sdk");

const host = "somewhere.com";
const port = "43443";
const port = 43443;
const user = "someone";
const password = "somesecret";
const protocol = "http";
const rejectUnauthorized = false;

const PROFILE_MAP = new Map<string, IProfile[]>();
PROFILE_MAP.set(
"cics", [{
name: "cics",
type: "cics",
host,
port,
user,
password
}]
);
const PROFILES: CommandProfiles = new CommandProfiles(PROFILE_MAP);
const PROFILE_MAP = {
name: "cics",
type: "cics",
host,
port,
user,
password
};

const DEFAULT_PARAMETERS: IHandlerParameters = mockHandlerParameters({
positionals: ["cics", "add-to-list", "csdGroup"],
definition: CSDGroupDefinition,
profiles: PROFILES
arguments: PROFILE_MAP
});

describe("AddToListProgramHandler", () => {
Expand Down Expand Up @@ -82,14 +79,14 @@ describe("AddToListProgramHandler", () => {
await handler.process(commandParameters);

expect(functionSpy).toHaveBeenCalledTimes(1);
const testProfile = PROFILE_MAP.get("cics")[0];

expect(functionSpy).toHaveBeenCalledWith(
new Session({
type: "basic",
hostname: testProfile.host,
port: testProfile.port,
user: testProfile.user,
password: testProfile.password,
hostname: PROFILE_MAP.host,
port: PROFILE_MAP.port,
user: PROFILE_MAP.user,
password: PROFILE_MAP.password,
rejectUnauthorized,
protocol
}),
Expand Down
Loading

0 comments on commit a08a64a

Please sign in to comment.