Skip to content

Commit

Permalink
Merge branch 'master' into i18n-sep-consoleSettings
Browse files Browse the repository at this point in the history
  • Loading branch information
JayaShakthi97 committed Mar 26, 2024
2 parents aa53dea + d0a3de4 commit 45a4edc
Show file tree
Hide file tree
Showing 252 changed files with 8,524 additions and 7,325 deletions.
135 changes: 135 additions & 0 deletions .github/workflows/check-changeset.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
# -------------------------------------------------------------------------------------
#
# Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com).
#
# WSO2 LLC. licenses this file to you under the Apache License,
# Version 2.0 (the "License"); you may not use this file except
# in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# --------------------------------------------------------------------------------------

# This workflow will check if a submitted PR has changesets.

name: 🦋 Check for Changeset

on:
workflow_run:
workflows: ["📩 Receive PR"]
types:
- completed

env:
GH_TOKEN: ${{ secrets.RELEASE_BOT_TOKEN }}

jobs:
check-changeset:
runs-on: ubuntu-latest
if: >
github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success'
steps:
- name: 📥 Download PR Number Artifact
uses: actions/[email protected]
with:
script: |
const artifacts = await github.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: ${{ github.event.workflow_run.id }},
});
const matchArtifact = artifacts.data.artifacts.find(artifact => artifact.name === "pr-number");
const download = await github.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: matchArtifact.id,
archive_format: 'zip',
});
const fs = require('fs');
fs.writeFileSync('${{github.workspace}}/pr-number.zip', Buffer.from(download.data));
- name: 📦 Extract PR Number Artifact
run: unzip pr-number.zip

- name: 💬 Remove Existing Changeset Comment
uses: actions/[email protected]
with:
github-token: ${{ env.GH_TOKEN }}
script: |
const fs = require('fs');
const PR_NUMBER = Number(fs.readFileSync('./PR_NUMBER', 'utf8').trim());
const REPO_OWNER = context.repo.owner;
const REPO_NAME = context.repo.repo;
// Fetch all comments on the pull request.
const comments = await github.issues.listComments({
owner: REPO_OWNER,
repo: REPO_NAME,
issue_number: PR_NUMBER,
});
console.log("COMMENTS_URL: https://api.github.com/repos/" + REPO_NAME + "/issues/" + PR_NUMBER + "/comments");
for (const comment of comments.data) {
console.log("COMMENT_OWNER: " + comment.user.login);
// Identify the changeset comment by its heading.
if (comment.body.includes("🦋 Changeset detected") || comment.body.includes("⚠️ No Changeset found")) {
console.log("COMMENT_ID_TO_DELETE: " + comment.id);
// Remove the changeset comment using the comment ID.
await github.issues.deleteComment({
owner: REPO_OWNER,
repo: REPO_NAME,
comment_id: comment.id,
});
}
}
- name: 💬 Add Changeset Comment
uses: actions/[email protected]
with:
github-token: ${{ env.GH_TOKEN }}
script: |
const fs = require('fs');
const PR_NUMBER = Number(fs.readFileSync('./PR_NUMBER', 'utf8').trim());
const REPO_OWNER = context.repo.owner;
const REPO_NAME = context.repo.repo;
const files = await github.pulls.listFiles({
owner: REPO_OWNER,
repo: REPO_NAME,
pull_number: PR_NUMBER,
});
const CHANGED_FILES = files.data.map(file => file.filename);
console.log("CHANGED_FILES_URL: https://api.github.com/repos/" + REPO_NAME + "/pulls/" + PR_NUMBER + "/files");
console.log("CHANGED_FILES:", CHANGED_FILES);
const CHANGES_COUNT = CHANGED_FILES.filter(filename => /^\.changeset\/.*\.md$/.test(filename)).length;
console.log("CHANGES_COUNT:", CHANGES_COUNT);
let COMMENT;
if (CHANGES_COUNT > 0) {
console.log("Changeset detected");
COMMENT = `<h3>🦋 Changeset detected</h3><p><b>The changes in this PR will be included in the next version bump.</b></p><p>Not sure what this means? <a href="https://github.com/changesets/changesets/blob/master/docs/adding-a-changeset.md">Click here to learn what changesets are</a>.</p>`;
} else {
console.log("No changeset detected");
COMMENT = `<h3>⚠️ No Changeset found</h3>Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go.</p><p><b>If these changes should result in a version bump, you need to add a changeset.</b></p><p>Refer <a href="https://github.com/wso2/identity-apps/blob/master/docs/release/README.md">Release Documentation</a> to learn how to add a changeset.`;
}
await github.issues.createComment({
owner: REPO_OWNER,
repo: REPO_NAME,
issue_number: PR_NUMBER,
body: COMMENT,
});
46 changes: 46 additions & 0 deletions .github/workflows/receive-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# -------------------------------------------------------------------------------------
#
# Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com).
#
# WSO2 LLC. licenses this file to you under the Apache License,
# Version 2.0 (the "License"); you may not use this file except
# in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# --------------------------------------------------------------------------------------

# This workflow will receive a PR and save the PR number for later use.

name: 📩 Receive PR

on:
pull_request:
branches: [master]

jobs:
save-pr-information:
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout
uses: actions/checkout@v3

- name: ℹ️ Display PR Information
run: echo "PR Number \#${{github.event.number}}"

- name: 💾 Save PR Number for Later Use
run: echo "${{github.event.number}}" > PR_NUMBER

- name: 📦 Upload PR Number as Artifact
uses: actions/upload-artifact@v3
with:
name: pr-number
path: PR_NUMBER
29 changes: 29 additions & 0 deletions apps/console/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,34 @@
# @wso2is/console

## 2.13.28

### Patch Changes

- [#5830](https://github.com/wso2/identity-apps/pull/5830) [`17ab3e87c6`](https://github.com/wso2/identity-apps/commit/17ab3e87c68da2c1971a00bcb6653e62682b996a) Thanks [@pavinduLakshan](https://github.com/pavinduLakshan)! - Add models for login security related doc links

## 2.13.27

### Patch Changes

- [#5823](https://github.com/wso2/identity-apps/pull/5823) [`970ee6eea1`](https://github.com/wso2/identity-apps/commit/970ee6eea1c91151d1bb101bc0b00a2e6476e9a9) Thanks [@savindi7](https://github.com/savindi7)! - Improve Profile Information.

## 2.13.26

### Patch Changes

- [#5822](https://github.com/wso2/identity-apps/pull/5822) [`beedc6b44f`](https://github.com/wso2/identity-apps/commit/beedc6b44f66800ba07a178796c48d31c8c0519e) Thanks [@pavinduLakshan](https://github.com/pavinduLakshan)! - Disable URL input validation for empty values in advanced tab in branding page

## 2.13.25

### Patch Changes

- [#5816](https://github.com/wso2/identity-apps/pull/5816) [`fd82055601`](https://github.com/wso2/identity-apps/commit/fd820556010c0f240bd695f0764bbe70b220d01c) Thanks [@Yasasr1](https://github.com/Yasasr1)! - Make secondary attribute dropdown in trusted token issuer advanced tab clearable

* [#5818](https://github.com/wso2/identity-apps/pull/5818) [`11701769b9`](https://github.com/wso2/identity-apps/commit/11701769b91ec2c865bcda4df1744bd8bbc44d4f) Thanks [@JeethJJ](https://github.com/JeethJJ)! - Introduce configurations to alter visibility of app configs

* Updated dependencies [[`fd82055601`](https://github.com/wso2/identity-apps/commit/fd820556010c0f240bd695f0764bbe70b220d01c)]:
- @wso2is/i18n@2.1.5

## 2.13.24

### Patch Changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.wso2.identity.apps</groupId>
<artifactId>identity-apps-console</artifactId>
<version>2.13.25-SNAPSHOT</version>
<version>2.13.29-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion apps/console/java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<groupId>org.wso2.identity.apps</groupId>
<artifactId>identity-apps-console</artifactId>
<packaging>pom</packaging>
<version>2.13.25-SNAPSHOT</version>
<version>2.13.29-SNAPSHOT</version>
<name>WSO2 Identity Server Console - Parent</name>
<description>WSO2 Identity Server Console Parent</description>

Expand Down
2 changes: 1 addition & 1 deletion apps/console/java/webapp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.wso2.identity.apps</groupId>
<artifactId>identity-apps-console</artifactId>
<version>2.13.25-SNAPSHOT</version>
<version>2.13.29-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
4 changes: 2 additions & 2 deletions apps/console/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@wso2is/console",
"version": "2.13.24",
"version": "2.13.28",
"description": "WSO2 Identity Server Console",
"author": "WSO2",
"license": "Apache-2.0",
Expand Down Expand Up @@ -57,7 +57,7 @@
"@wso2is/dynamic-forms": "^2.0.40",
"@wso2is/form": "^2.0.41",
"@wso2is/forms": "^2.0.27",
"@wso2is/i18n": "^2.1.4",
"@wso2is/i18n": "^2.1.5",
"@wso2is/react-components": "^2.1.11",
"@wso2is/theme": "^2.0.70",
"@wso2is/validation": "^2.0.3",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved.
* Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com).
*
* WSO2 LLC. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
Expand All @@ -16,6 +16,7 @@
* under the License.
*/

import { IdentityAppsApiException } from "@wso2is/core/exceptions";
import { AlertInterface, AlertLevels, IdentifiableComponentInterface } from "@wso2is/core/models";
import { addAlert } from "@wso2is/core/store";
import { Field, Form, FormPropsInterface } from "@wso2is/form";
Expand All @@ -25,7 +26,6 @@ import {
Heading,
PrimaryButton
} from "@wso2is/react-components";
import { IdentityAppsApiException } from "@wso2is/core/exceptions";
import React, { MutableRefObject, ReactElement, useEffect, useRef, useState } from "react";
import { useTranslation } from "react-i18next";
import { useDispatch } from "react-redux";
Expand Down Expand Up @@ -70,7 +70,7 @@ const ApplicationRoleMapping = (props: AssignGroupProps): ReactElement => {

const [ isAuthenticatorRequestLoading, setAuthenticatorRequestLoading ] = useState<boolean>(true);
const [ isSubmitting, setIsSubmitting ] = useState<boolean>(false);
const [ attributeStepAuthenticators, setAttributeStepAuthenticators ]
const [ attributeStepAuthenticators, setAttributeStepAuthenticators ]
= useState<ApplicationAuthenticatorInterface[]>([]);
const [ formInitialValues, setFormInitialValues ] = useState<Record<string, boolean>>({});
const [ federatedAuthenticators, setFederatedAuthenticators ] = useState<AuthenticatorInterface[]>([]);
Expand All @@ -80,7 +80,7 @@ const ApplicationRoleMapping = (props: AssignGroupProps): ReactElement => {
getFederatedAuthenticators();
}, []);

useEffect(() => {
useEffect(() => {
getAttributeStepAuthenticators();
}, [ application ]);

Expand All @@ -97,8 +97,8 @@ const ApplicationRoleMapping = (props: AssignGroupProps): ReactElement => {
*/
const getAttributeStepAuthenticators = () => {
const attributeStepId: number = application?.authenticationSequence?.attributeStepId;
if (attributeStepId) {

if (attributeStepId) {
setAttributeStepAuthenticators(application?.authenticationSequence?.steps[attributeStepId - 1]?.options);
}
};
Expand All @@ -112,7 +112,7 @@ const ApplicationRoleMapping = (props: AssignGroupProps): ReactElement => {
getAuthenticators(null, AuthenticatorTypes.FEDERATED)
.then((response: AuthenticatorInterface[]) => {
// Remove Organization Login federated authenticator from the list
const filteredFederatedAuthenticators: AuthenticatorInterface[]
const filteredFederatedAuthenticators: AuthenticatorInterface[]
= response.filter((authenticator: AuthenticatorInterface) => {
return authenticator.name !== ApplicationRolesConstants.ORGANIZATION_LOGIN;
});
Expand All @@ -124,28 +124,28 @@ const ApplicationRoleMapping = (props: AssignGroupProps): ReactElement => {
dispatch(
addAlert({
description: t(
"console:develop.features.authenticationProvider.notifications" +
"authenticationProvider:notifications" +
".getIDPList.error.message",
{ description: error.response.data.description }
),
level: AlertLevels.ERROR,
message: t(
"console:develop.features.authenticationProvider.notifications.getIDPList.error.message"
"authenticationProvider:notifications.getIDPList.error.message"
)
})
);

return;
}
dispatch(
addAlert({
description: t(
"console:develop.features.authenticationProvider.notifications" +
"authenticationProvider:notifications" +
".getIDPList.genericError.description"
),
level: AlertLevels.ERROR,
message: t(
"console:develop.features.authenticationProvider.notifications" +
"authenticationProvider:notifications" +
".getIDPList.genericError.message"
)
})
Expand All @@ -157,7 +157,7 @@ const ApplicationRoleMapping = (props: AssignGroupProps): ReactElement => {

const getAutheticatorGroups = () => {
// Filter the federated autheticators that are in the attribute step
const filteredFederatedAuthenticators: ApplicationAuthenticatorInterface[]
const filteredFederatedAuthenticators: ApplicationAuthenticatorInterface[]
= attributeStepAuthenticators.filter((attributeStepAuthenticator: ApplicationAuthenticatorInterface) => {
return federatedAuthenticators.find((federatedAuthenticator: AuthenticatorInterface) => {
return federatedAuthenticator.name === attributeStepAuthenticator.idp;
Expand Down Expand Up @@ -191,7 +191,7 @@ const ApplicationRoleMapping = (props: AssignGroupProps): ReactElement => {
};

appRoleConfigurationData.push(appRoleConfiguration);
}
}

const applicationData: ApplicationInterface = {
appRoleConfigurations: appRoleConfigurationData,
Expand Down Expand Up @@ -306,7 +306,7 @@ const ApplicationRoleMapping = (props: AssignGroupProps): ReactElement => {
label={ authenticator.idp }
tabIndex={ 3 }
width={ 16 }
data-componentid={
data-componentid={
`${ componentId }-${ authenticator.idp }-checkbox` }
/>
);
Expand Down
2 changes: 2 additions & 0 deletions apps/console/src/extensions/configs/application.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,9 @@ export const applicationConfig: ApplicationConfig = {
showClientSecretMessage: false,
showFrontChannelLogout: false,
showIdTokenEncryption: true,
showIdTokenResponseSigningAlgorithm: true,
showNativeClientSecretMessage: false,
showRequestObjectConfigurations: true,
showRequestObjectSignatureValidation: false,
showReturnAuthenticatedIdPList: false,
showScopeValidators: false
Expand Down
Loading

0 comments on commit 45a4edc

Please sign in to comment.