Skip to content

Commit

Permalink
Merge branch 'main' into feat-default-ds
Browse files Browse the repository at this point in the history
Signed-off-by: Tianyu Gao <[email protected]>
  • Loading branch information
raintygao authored Jul 16, 2024
2 parents 65f09a2 + 30067fa commit c533ba8
Show file tree
Hide file tree
Showing 127 changed files with 2,774 additions and 948 deletions.
56 changes: 42 additions & 14 deletions .github/workflows/add-untriaged.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,30 +17,58 @@ jobs:
const repoOwner = context.repo.owner;
const repoName = context.repo.repo;
let isCollaborator = false;
console.log(`Checking collaborator status for ${issueAuthor} in ${repoOwner}/${repoName}`);
try {
// Attempt to fetch user's permission level
await github.rest.repos.getCollaboratorPermissionLevel({
const { data: permissionLevel } = await github.rest.repos.getCollaboratorPermissionLevel({
owner: repoOwner,
repo: repoName,
username: issueAuthor,
});
// If no error is thrown, the user is a collaborator
isCollaborator = true;
console.log(`Permission level for ${issueAuthor}: ${permissionLevel.permission}`);
if (permissionLevel.permission !== 'none') {
isCollaborator = true;
console.log(`${issueAuthor} is a collaborator with ${permissionLevel.permission} permission.`);
} else {
console.log(`${issueAuthor} has 'none' permission, considered as non-collaborator.`);
}
} catch (error) {
// Error thrown indicates the user is not a collaborator,
// or does not have explicit permission set.
console.log(`${issueAuthor} is not a collaborator.`);
if (error.status === 404) {
console.log(`${issueAuthor} is not a collaborator (404 error).`);
} else {
console.error(`Error checking collaborator status: ${error.message}`);
core.setFailed(`Error checking collaborator status: ${error.message}`);
return;
}
}
core.setOutput('is_collaborator', isCollaborator.toString());
console.log(`Set output is_collaborator to: ${isCollaborator.toString()}`);
- name: Debug outputs
run: |
echo "Is collaborator: ${{ steps.check-collaborator.outputs.is_collaborator }}"
echo "Issue author: ${{ github.event.issue.user.login }}"
echo "Repo: ${{ github.repository }}"
- name: Apply label if not a collaborator
if: steps.check-collaborator.outputs.is_collaborator == 'false'
uses: actions/github-script@v6
with:
script: |
github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['untriaged']
})
console.log('Attempting to add "untriaged" label');
try {
await github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['untriaged']
});
console.log('Successfully added "untriaged" label');
} catch (error) {
console.error(`Error adding label: ${error.message}`);
core.setFailed(`Error adding label: ${error.message}`);
}
2 changes: 2 additions & 0 deletions .github/workflows/build_and_test_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@ on:
- '**/*.md'
- 'docs/**'
- '.lycheeignore'
- 'CODEOWNERS'
- 'changelogs/fragments/**'
pull_request:
branches: ['**']
paths-ignore:
- '**/*.md'
- 'docs/**'
- '.lycheeignore'
- 'CODEOWNERS'
- 'changelogs/fragments/**'

env:
Expand Down
2 changes: 2 additions & 0 deletions changelogs/fragments/7133.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
feat:
- [Workspace] Refactor workspace form UI ([#7133](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7133))
2 changes: 2 additions & 0 deletions changelogs/fragments/7166.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
feat:
- 1. Add current nav group into chrome service 2. Prepend current nav group into breadcrumb ([#7166](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7166))
2 changes: 2 additions & 0 deletions changelogs/fragments/7192.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
refactor:
- [Look&Feel] Refactor to use semantic headers for page, modal & flyout ([#7192](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7192))
2 changes: 2 additions & 0 deletions changelogs/fragments/7195.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
refactor:
- [Look&Feel] Consistency of Plus Icons ([#7195](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7195))
2 changes: 2 additions & 0 deletions changelogs/fragments/7197.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
chore:
- Skip running tests for updates in CODEOWNERS ([#7197](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7197))
2 changes: 2 additions & 0 deletions changelogs/fragments/7200.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
refactor:
- [Look&Feel] Update Popover Padding Size ([#7200](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7200))
2 changes: 2 additions & 0 deletions changelogs/fragments/7211.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
feat:
- Address styling of non-primary buttons by making secondary/empty ([#7211](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7211))
2 changes: 2 additions & 0 deletions changelogs/fragments/7235.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
feat:
- Add all use case ([#7235](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7235))
16 changes: 9 additions & 7 deletions src/core/public/application/ui/app_not_found_screen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* under the License.
*/

import { EuiEmptyPrompt, EuiPage, EuiPageBody, EuiPageContent } from '@elastic/eui';
import { EuiEmptyPrompt, EuiPage, EuiPageBody, EuiPageContent, EuiText } from '@elastic/eui';
import React from 'react';
import { FormattedMessage } from '@osd/i18n/react';

Expand All @@ -48,12 +48,14 @@ export const AppNotFound = () => (
</h2>
}
body={
<p>
<FormattedMessage
id="core.application.appNotFound.pageDescription"
defaultMessage="No application was found at this URL. Try going back or choosing an app from the menu."
/>
</p>
<EuiText size="s">
<p>
<FormattedMessage
id="core.application.appNotFound.pageDescription"
defaultMessage="No application was found at this URL. Try going back or choosing an app from the menu."
/>
</p>
</EuiText>
}
/>
</EuiPageContent>
Expand Down
2 changes: 2 additions & 0 deletions src/core/public/chrome/chrome_service.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ const createStartContractMock = () => {
navGroup: {
getNavGroupsMap$: jest.fn(() => new BehaviorSubject({})),
getNavGroupEnabled: jest.fn(),
getCurrentNavGroup$: jest.fn(() => new BehaviorSubject(undefined)),
setCurrentNavGroup: jest.fn(),
},
setAppTitle: jest.fn(),
setIsVisible: jest.fn(),
Expand Down
4 changes: 3 additions & 1 deletion src/core/public/chrome/chrome_service.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ export class ChromeService {
const navLinks = this.navLinks.start({ application, http });
const recentlyAccessed = await this.recentlyAccessed.start({ http, workspaces });
const docTitle = this.docTitle.start({ document: window.document });
const navGroup = await this.navGroup.start({ navLinks });
const navGroup = await this.navGroup.start({ navLinks, application });

// erase chrome fields from a previous app while switching to a next app
application.currentAppId$.subscribe(() => {
Expand Down Expand Up @@ -301,6 +301,8 @@ export class ChromeService {
survey={injectedMetadata.getSurvey()}
collapsibleNavHeaderRender={this.collapsibleNavHeaderRender}
sidecarConfig$={sidecarConfig$}
navGroupEnabled={navGroup.getNavGroupEnabled()}
currentNavgroup$={navGroup.getCurrentNavGroup$()}
/>
),

Expand Down
Loading

0 comments on commit c533ba8

Please sign in to comment.