Skip to content

Commit

Permalink
Merge branch 'master' into doc/introduction
Browse files Browse the repository at this point in the history
  • Loading branch information
KhudaDad414 authored Apr 4, 2024
2 parents ccbb96c + d3148e5 commit c470434
Show file tree
Hide file tree
Showing 9 changed files with 333 additions and 272 deletions.
1 change: 1 addition & 0 deletions .github/workflows/help-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
At the moment the following comments are supported in pull requests:

- \`/please-take-a-look` or \`/ptal\` - This comment will add a comment to the PR asking for attention from the reviewrs who have not reviewed the PR yet.
- \`/ready-to-merge\` or \`/rtm\` - This comment will trigger automerge of PR in case all required checks are green, approvals in place and do-not-merge label is not added
- \`/do-not-merge\` or \`/dnm\` - This comment will block automerging even if all conditions are met and ready-to-merge label is added
- \`/autoupdate\` or \`/au\` - This comment will add \`autoupdate\` label to the PR and keeps your PR up-to-date to the target branch's future changes. Unless there is a merge conflict or it is a draft PR.`
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/if-nodejs-pr-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
id: should_run
name: Should Run
run: echo "shouldrun=true" >> $GITHUB_OUTPUT
shell: bash
- if: steps.should_run.outputs.shouldrun == 'true'
name: Set git to use LF #to once and for all finish neverending fight between Unix and Windows
run: |
Expand Down Expand Up @@ -60,13 +61,13 @@ jobs:
- if: steps.packagejson.outputs.exists == 'true'
name: Install dependencies
id: first-installation
run: npm install --loglevel verbose
run: npm ci
continue-on-error: true
- if: steps.first-installation.outputs.status == 'failure' && steps.packagejson.outputs.exists == 'true'
- if: steps.first-installation.outcome != 'success' && steps.packagejson.outputs.exists == 'true'
name: Clear NPM cache and install deps again
run: |
npm cache clean --force
npm install --loglevel verbose
npm ci
- if: steps.packagejson.outputs.exists == 'true'
name: Test
run: npm test --if-present
Expand Down
54 changes: 54 additions & 0 deletions .github/workflows/please-take-a-look-command.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# This action is centrally managed in https://github.com/asyncapi/.github/
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in above mentioned repo

# It uses Github actions to listen for comments on issues and pull requests and
# if the comment contains /ping-for-attention or /pfa it will add a comment pinging
# the code-owners who have not yet reviewed the pull request

name: Please take a Look

on:
issue_comment:
types: [created]

jobs:
ping-for-attention:
if: >
github.event.issue.pull_request &&
github.event.issue.state != 'closed' &&
github.actor != 'asyncapi-bot' &&
(
contains(github.event.comment.body, '/please-take-a-look') ||
contains(github.event.comment.body, '/ptal') ||
contains(github.event.comment.body, '/PTAL')
)
runs-on: ubuntu-latest
steps:
- name: Check for Please Take a Look Command
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GH_TOKEN }}
script: |
const prDetailsUrl = context.payload.issue.pull_request.url;
const { data: pull } = await github.request(prDetailsUrl);
const reviewers = pull.requested_reviewers.map(reviewer => reviewer.login);
const { data: reviews } = await github.rest.pulls.listReviews({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.issue.number
});
const reviewersWhoHaveReviewed = reviews.map(review => review.user.login);
const reviewersWhoHaveNotReviewed = reviewers.filter(reviewer => !reviewersWhoHaveReviewed.includes(reviewer));
if (reviewersWhoHaveNotReviewed.length > 0) {
const comment = reviewersWhoHaveNotReviewed.map(reviewer => `@${reviewer}`).join(' ');
await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `${comment} Please take a look at this PR. Thanks! :wave:`
});
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useState } from 'react';
import { VisualEditor, CodeEditor, Examples } from '@asyncapi/studio-ui';

export default {
const VisualEditorStory = {
component: VisualEditor,
parameters: {
layout: 'fullscreen',
Expand Down Expand Up @@ -282,3 +282,4 @@ export const nestead_array = () => (
/>
);

export default VisualEditorStory
4 changes: 1 addition & 3 deletions apps/studio-next/src/components/Editor/Editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
import { useFilesState } from '@/state/files.state';
import { CodeMirror } from './CodeMirror';

interface IEditorProps {}

export const Editor = (props: IEditorProps) => {
export const Editor = () => {
const { language, content } = useFilesState(state => state.files['asyncapi']);
const handleUpdateFile = useFilesState(state => state.updateFile);

Expand Down
6 changes: 6 additions & 0 deletions apps/studio/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @asyncapi/studio

## 0.21.0

### Minor Changes

- 26dc05f: Fix side bar color and update @asyncapi/html-template.

## 0.20.2

### Patch Changes
Expand Down
20 changes: 10 additions & 10 deletions apps/studio/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@asyncapi/studio",
"version": "0.20.2",
"version": "0.21.0",
"description": "One place that allows you to develop an AsyncAPI document, validate it, convert it to the latest version, preview the documentation and visualize the events flow.",
"license": "Apache-2.0",
"bugs": {
Expand All @@ -22,13 +22,13 @@
"./LICENSE"
],
"dependencies": {
"@asyncapi/avro-schema-parser": "^3.0.18",
"@asyncapi/converter": "^1.4.15",
"@asyncapi/openapi-schema-parser": "^3.0.18",
"@asyncapi/parser": "^3.0.10",
"@asyncapi/protobuf-schema-parser": "^3.2.8",
"@asyncapi/avro-schema-parser": "^3.0.19",
"@asyncapi/converter": "^1.4.17",
"@asyncapi/openapi-schema-parser": "^3.0.20",
"@asyncapi/parser": "^3.0.12",
"@asyncapi/protobuf-schema-parser": "^3.2.10",
"@asyncapi/react-component": "^1.2.2",
"@asyncapi/specs": "^6.5.3",
"@asyncapi/specs": "^6.5.5",
"@ebay/nice-modal-react": "^1.2.10",
"@headlessui/react": "^1.7.4",
"@hookstate/core": "^4.0.0-rc21",
Expand Down Expand Up @@ -75,13 +75,13 @@
},
"devDependencies": {
"@asyncapi/dotnet-nats-template": "^0.12.1",
"@asyncapi/go-watermill-template": "^0.2.72",
"@asyncapi/html-template": "^2.2.2",
"@asyncapi/go-watermill-template": "^0.2.73",
"@asyncapi/html-template": "^2.3.2",
"@asyncapi/java-spring-cloud-stream-template": "^0.13.4",
"@asyncapi/java-spring-template": "^1.5.1",
"@asyncapi/java-template": "^0.2.1",
"@asyncapi/markdown-template": "^1.5.0",
"@asyncapi/nodejs-template": "^2.0.0",
"@asyncapi/nodejs-template": "^2.0.1",
"@asyncapi/nodejs-ws-template": "^0.9.33",
"@asyncapi/python-paho-template": "^0.2.13",
"@asyncapi/ts-nats-template": "^0.10.3",
Expand Down
4 changes: 2 additions & 2 deletions apps/studio/src/components/Navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -283,11 +283,11 @@ export const Navigation: React.FunctionComponent<NavigationProps> = ({

if (!rawSpec || !document) {
return (
<div className="flex flex-1 overflow-hidden h-full justify-center items-center text-2xl mx-auto px-6 text-center" style={{ backgroundColor: 'black' }}>
<div className="flex flex-1 overflow-hidden h-full justify-center items-center text-2xl mx-auto px-6 text-center bg-gray-800">
{loading ?(
<div className="rotating-wheel"></div>
) : (
<p style={{ color: 'white' }}>Empty or invalid document. Please fix errors/define AsyncAPI document.</p>
<p className='text-white'>Empty or invalid document. Please fix errors/define AsyncAPI document.</p>
)
}
</div>
Expand Down
Loading

0 comments on commit c470434

Please sign in to comment.