Skip to content

Commit

Permalink
Merge branch 'master' into 3293
Browse files Browse the repository at this point in the history
  • Loading branch information
aakankshabhende committed Oct 30, 2024
2 parents d308476 + baa5f90 commit 44b8d61
Show file tree
Hide file tree
Showing 30 changed files with 1,076 additions and 802 deletions.
47 changes: 44 additions & 3 deletions .github/workflows/if-nodejs-pr-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
name: PR testing - if Node project

on:
pull_request:
pull_request_target:
types: [opened, reopened, synchronize, ready_for_review]
push:
branches: [master]

jobs:
test-nodejs-pr:
Expand Down Expand Up @@ -40,6 +42,11 @@ jobs:
- if: steps.should_run.outputs.shouldrun == 'true'
name: Checkout repository
uses: actions/checkout@v4
with:
# Checkout the merge commit instead of the pull request head commit for a pull request
# Fallback to the head commit if its not a pull request
ref: ${{ github.event.pull_request.number != '' && format('refs/pull/{0}/merge', github.event.pull_request.number) || github.ref }}

- if: steps.should_run.outputs.shouldrun == 'true'
name: Check if Node.js project and has package.json
id: packagejson
Expand All @@ -59,8 +66,7 @@ jobs:
name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "${{ steps.nodeversion.outputs.version }}"

node-version: '${{ steps.nodeversion.outputs.version }}'
- name: Install dependencies
run: npm ci
- if: steps.packagejson.outputs.exists == 'true'
Expand All @@ -74,6 +80,41 @@ jobs:
shell: bash
run: npm run generate:assets --if-present

# Run the test:md script and capture output
- if: ${{ steps.packagejson.outputs.exists == 'true' && matrix.os == 'ubuntu-latest' }}
name: Run markdown checks
id: markdown_check
run: |
ERRORS=$(npm run test:md | sed -n '/Errors in file/,$p')
echo "markdown_output<<EOF" >> $GITHUB_OUTPUT
echo "$ERRORS" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
# Post a comment using sticky-pull-request-comment
- name: Comment on PR with markdown issues
if: ${{ steps.markdown_check.outputs.markdown_output != '' && matrix.os == 'ubuntu-latest' }}
uses: marocchino/sticky-pull-request-comment@3d60a5b2dae89d44e0c6ddc69dd7536aec2071cd
with:
header: markdown-check-error
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
message: |
### Markdown Check Results
We found issues in the following markdown files:
```
${{ steps.markdown_check.outputs.markdown_output }}
```
# Delete the comment if there are no issues
- if: ${{ steps.markdown_check.outputs.markdown_output == '' && matrix.os == 'ubuntu-latest' }}
name: Delete markdown check comment
uses: marocchino/sticky-pull-request-comment@3d60a5b2dae89d44e0c6ddc69dd7536aec2071cd
with:
header: markdown-check-error
delete: true
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}

- if: steps.packagejson.outputs.exists == 'true'
name: Upload Coverage to Codecov
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/regenerate-meetings-and-videos.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: List everyday latest list of AsyncAPI Meetings, Newsroom Videos and Dashboard data.

on:
on:
workflow_dispatch:
schedule:
#every day at midnight
Expand All @@ -23,7 +23,7 @@ jobs:
- name: Check package-lock version
uses: asyncapi/.github/.github/actions/get-node-version-from-package-lock@master
id: lockversion

- name: Use Node.js
uses: actions/setup-node@v3
with:
Expand All @@ -45,7 +45,7 @@ jobs:
committer: asyncapi-bot <[email protected]>
author: asyncapi-bot <[email protected]>
title: 'chore: update meetings.json and newsrooom_videos.json'
branch: update-meetings/${{ github.job }}
branch: update-meetings/${{ github.sha }}
- if: failure() # Only, on failure, send a message on the 94_bot-failing-ci slack channel
name: Report workflow run status to Slack
uses: 8398a7/action-slack@fbd6aa58ba854a740e11a35d0df80cb5d12101d8 #using https://github.com/8398a7/action-slack/releases/tag/v3.15.1
Expand All @@ -54,4 +54,4 @@ jobs:
fields: repo,action,workflow
text: 'AsyncAPI Meetings and Videos workflow failed'
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CI_FAIL_NOTIFY }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CI_FAIL_NOTIFY }}
49 changes: 23 additions & 26 deletions components/campaigns/AnnouncementHero.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React, { useEffect, useState } from 'react';
import React, { useEffect, useMemo, useState } from 'react';

import ArrowLeft from '../icons/ArrowLeft';
import ArrowRight from '../icons/ArrowRight';
import Container from '../layout/Container';
import Banner from './AnnouncementBanner';
import { banners } from './banners';
import { banners, shouldShowBanner } from './banners';

interface IAnnouncementHeroProps {
className?: string;
Expand All @@ -21,15 +21,15 @@ interface IAnnouncementHeroProps {
export default function AnnouncementHero({ className = '', small = false }: IAnnouncementHeroProps) {
const [activeIndex, setActiveIndex] = useState(0);

const len = banners.length;
const numberOfVisibleBanners = banners.filter((banner) => banner.show).length;
const visibleBanners = useMemo(() => banners.filter((banner) => shouldShowBanner(banner.cfpDeadline)), [banners]);
const numberOfVisibleBanners = visibleBanners.length;

const goToPrevious = () => {
setActiveIndex((prevIndex) => (prevIndex === 0 ? len - 1 : prevIndex - 1));
setActiveIndex((prevIndex) => (prevIndex === 0 ? numberOfVisibleBanners - 1 : prevIndex - 1));
};

const goToNext = () => {
setActiveIndex((prevIndex) => (prevIndex === len - 1 ? 0 : prevIndex + 1));
setActiveIndex((prevIndex) => (prevIndex === numberOfVisibleBanners - 1 ? 0 : prevIndex + 1));
};

const goToIndex = (index: number) => {
Expand Down Expand Up @@ -62,31 +62,28 @@ export default function AnnouncementHero({ className = '', small = false }: IAnn
)}
<div className='relative flex w-5/6 flex-col items-center justify-center gap-2'>
<div className='relative flex min-h-72 w-full items-center justify-center overflow-hidden lg:h-[17rem] lg:w-[38rem]'>
{banners.map(
(banner, index) =>
banner.show && (
<Banner
key={index}
title={banner.title}
dateLocation={banner.dateLocation}
cfaText={banner.cfaText}
eventName={banner.eventName}
cfpDeadline={banner.cfpDeadline}
link={banner.link}
city={banner.city}
activeBanner={index === activeIndex % len}
className={className}
small={small}
/>
)
)}
{visibleBanners.map((banner, index) => (
<Banner
key={index}
title={banner.title}
dateLocation={banner.dateLocation}
cfaText={banner.cfaText}
eventName={banner.eventName}
cfpDeadline={banner.cfpDeadline}
link={banner.link}
city={banner.city}
activeBanner={index === activeIndex % numberOfVisibleBanners}
className={className}
small={small}
/>
))}
</div>
<div className='m-auto flex justify-center'>
{banners.map((banner, index) => (
{visibleBanners.map((banner, index) => (
<div
key={index}
className={`mx-1 size-2 cursor-pointer rounded-full ${
activeIndex % len === index ? 'bg-primary-500' : 'bg-gray-300'
activeIndex % numberOfVisibleBanners === index ? 'bg-primary-500' : 'bg-gray-300'
}`}
onClick={() => goToIndex(index)}
/>
Expand Down
20 changes: 8 additions & 12 deletions components/campaigns/banners.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @returns Whether the banner should be shown
* @description Check if the current date is after the deadline
*/
function shouldShowBanner(cfpDeadline: string) {
export function shouldShowBanner(cfpDeadline: string) {
const currentDate = new Date(); // G et the current date
const deadline = new Date(cfpDeadline); // Convert the cfpDeadline string to a Date object

Expand All @@ -15,18 +15,14 @@ function shouldShowBanner(cfpDeadline: string) {
return true;
}

const cfpDeadlineParis = '2024-10-12T06:00:00Z';
const showBannerParis = shouldShowBanner(cfpDeadlineParis);

export const banners = [
{
title: "AsyncAPI Conf on Tour'24",
city: 'Paris',
dateLocation: '3rd - 5th of December, 2024 | France, Paris',
cfaText: 'Apply To Speak',
eventName: 'the end of Call for Speakers',
cfpDeadline: cfpDeadlineParis,
link: 'https://conference.asyncapi.com/venue/Paris',
show: showBannerParis
title: "AsyncAPI Online Conference'24",
city: 'YouTube',
dateLocation: '30th of October, 2024 | YouTube & LinkedIn',
cfaText: 'Join us Live',
eventName: 'the AsyncAPI Online Conference',
cfpDeadline: '2024-10-30T06:00:00Z',
link: 'https://www.youtube.com/live/F9wHxd-v2f0?si=kPCqgUzqAKC0FaqJ'
}
];
10 changes: 2 additions & 8 deletions components/newsroom/Newsroom.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react';
import { TwitterTimelineEmbed } from 'react-twitter-embed';

import { HeadingLevel, HeadingTypeStyle } from '@/types/typography/Heading';
import { ParagraphTypeStyle } from '@/types/typography/Paragraph';
Expand Down Expand Up @@ -69,19 +68,14 @@ export default function Newsroom() {
</div>
</div>

<div className='w-full flex-row items-stretch justify-between md:flex lg:w-3/4'>
<div className='w-full flex-row items-stretch justify-between md:flex md:h-120 lg:w-3/4'>
<div className='relative flex w-full flex-col overflow-y-auto md:w-1/2'>
<div className='min-h-0'>
<div className='md:t-0 md:b-0 md:l-0 md:r-0 size-full max-h-120 md:absolute'>
<div className='md:t-0 md:b-0 md:l-0 md:r-0 size-full md:absolute'>
<NewsroomArticle />
</div>
</div>
</div>
<div className='w-full px-2 md:w-1/2 md:pl-4 md:pr-0'>
<div className='mx-auto mt-8 w-full rounded-xl shadow-md md:mt-0' data-testid='Newsroom-Twitter'>
<TwitterTimelineEmbed sourceType='profile' screenName='AsyncAPISpec' options={{ tweetLimit: '2' }} />
</div>
</div>
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion components/sponsors/SilverSponsorsList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export const Silversponsors: SponsorType[] = [
{
name: 'Bump.sh',
website: 'https://bump.sh/asyncapi?utm_source=asyncapi&utm_medium=referral&utm_campaign=sponsor',
altText: 'Bump',
altText: 'OpenAPI & AsyncAPI API docs - Bump.sh',
imageSrc: '/img/sponsors/bumpsh.svg',
imageClass: 'inline-block sm:h-9'
},
Expand Down
14 changes: 13 additions & 1 deletion config/adopters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,16 @@
useCase: Implementing a GitOps-based pipeline to enable self-service management of Kafka infrastructure, including access control management. Automation of AsyncAPI document governance ensures consistency in the infrastructure at the pull request level.
resources:
- title: "Slides: AsyncAPI For Platform Self-Service: A GitOps Tale"
link: https://drive.google.com/file/d/1y67PI8NaITPPwZAiDF2Zs7ISfcIpqMV8/view?usp=sharing
link: https://drive.google.com/file/d/1y67PI8NaITPPwZAiDF2Zs7ISfcIpqMV8/view?usp=sharing

- companyName: Adidas
useCase: AsyncAPI is a standard for defining asynchronous APIs using Apache Kafka. AsyncAPI governed under official guidelines. AsyncAPI is promoted to be used for documentation and code generation.
resources:
- title: "Docs: AsyncAPI and Kafka Guidelines"
link: https://adidas.gitbook.io/api-guidelines/asynchronous-api-guidelines/kafka-asynchronous-guidelines/a_introduction/why-asyncapi

- companyName: Morgan Stanley
useCase: AsyncAPI is promoted not only inside the company but also as a standard for FinOS Foundation for managing architecture as code.
resources:
- title: "Slides: Deploying WebSockets with AsyncAPI and Architecture as Code"
link: https://drive.google.com/file/d/1YzLwQZsMUXGwj_Lsqv-ZnvV2knuowWrS/view?usp=drive_link
Loading

0 comments on commit 44b8d61

Please sign in to comment.