Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/slack-notifications.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Notify Slack on Master Branch Workflows

on:
push:
branches:
- master

jobs:
notify:
runs-on: ubuntu-latest
steps:
- name: Send notification to Slack
uses: rtCamp/action-slack-notify@v2.1.0
env:
SLACK_WEBHOOK: ${{ secrets.WEBSITE_SLACK_WEBHOOK }}
SLACK_USERNAME: 'GitHub Actions'
SLACK_ICON_EMOJI: ':rocket:'
SLACK_MESSAGE: 'A workflow has been triggered on the master branch.'
10 changes: 9 additions & 1 deletion components/navigation/BlogPostItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ export default forwardRef(function BlogPostItem(
) {
let typeColors: [string, string] = ['bg-indigo-100', 'text-indigo-800'];

const isFeatured = post.featured;


switch (post.type.toLowerCase()) {
case BlogPostType.Video:
typeColors = ['bg-pink-100', 'text-pink-800'];
Expand All @@ -52,7 +55,7 @@ export default forwardRef(function BlogPostItem(
}

return (
<li className={`list-none rounded-lg ${className}`} ref={ref} id={id}>
<li className={`list-none rounded-lg ${className} relative`} ref={ref} id={id}>
<article className='h-full rounded-lg'>
<Link href={post.slug}>
<span
Expand All @@ -61,6 +64,11 @@ export default forwardRef(function BlogPostItem(
}
data-testid='BlogPostItem-Link'
>
{post.featured && (
<span className="featured-label bg-yellow-100 text-yellow-800 font-bold px-2 py-1 rounded-md absolute top-2 left-2 z-10">
Featured
</span>
)}
Comment on lines +67 to +71
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Fix string quote style to maintain consistency.

The code uses double quotes for the className which violates the project's ESLint rules. Also, consider extracting these classes to a variable or constant for better readability if this style is used elsewhere.

- <span className="featured-label bg-yellow-100 text-yellow-800 font-bold px-2 py-1 rounded-md absolute top-2 left-2 z-10">
+ <span className='featured-label bg-yellow-100 text-yellow-800 font-bold px-2 py-1 rounded-md absolute top-2 left-2 z-10'>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{post.featured && (
<span className="featured-label bg-yellow-100 text-yellow-800 font-bold px-2 py-1 rounded-md absolute top-2 left-2 z-10">
Featured
</span>
)}
{post.featured && (
<span className='featured-label bg-yellow-100 text-yellow-800 font-bold px-2 py-1 rounded-md absolute top-2 left-2 z-10'>
Featured
</span>
)}
🧰 Tools
🪛 ESLint

[error] 68-68: Replace "featured-label·bg-yellow-100·text-yellow-800·font-bold·px-2·py-1·rounded-md·absolute·top-2·left-2·z-10" with 'featured-label·bg-yellow-100·text-yellow-800·font-bold·px-2·py-1·rounded-md·absolute·top-2·left-2·z-10'

(prettier/prettier)


[error] 68-68: Unexpected usage of doublequote.

(jsx-quotes)

<img
className='h-48 w-full object-cover'
src={post.cover}
Expand Down
12 changes: 6 additions & 6 deletions markdown/about/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@ The total number of companies and projects using AsyncAPI as well as their ident
- [**Adidas**](https://www.adidas.com/us): Company dedicated to manufacturing sports equipment and fashion products. It is the largest sportswear manufacturer in Europe, and the second largest in the world. This company has more than 150.000 sales outlets around the world.
- [**Salesforce**](https://login.salesforce.com/?locale=es): Business consultancy company. It provides (CRM) services and more. It manages from small businesses to FORTUNE 500 companies, and it has more than 150,000 customers.
- [**IBM**](https://www.ibm.com): Company that manufactures and markets hardware and software. It has operations in over 170 countries and provides hosting and consulting services in many areas.
- [**SAP**](https://www.sap.com/index.html): Company dedicated to the design of computer products for business management. Develops business software to manage operations and business-to-customer relationships. Its a large company with 100,330 employees.
- [**SAP**](https://www.sap.com/index.html): Company dedicated to the design of computer products for business management. Develops business software to manage operations and business-to-customer relationships. It's a large company with 100,330 employees.
- [**IQVIA**](https://www.iqvia.com/): Company providing services for the combined health information technology and clinical research industries. It employs more than 58.000 people in over 100 countries.

## Values of AsyncAPI

- **Innovative**. There is no other specification that covers the messaging needs in event-driven architecture that AsyncAPI is covering. What it tries to do is to integrate with the existing tools and remove walls for communication.
- **Free**. Its a free software project: it seeks the user's liberty by offering a tool that can be used and enhanced without restrictions.
- **Free**. It's a free software project: it seeks the user's liberty by offering a tool that can be used and enhanced without restrictions.
- **Open**. As it's an open-source project, not a company or a product. It works in a change of paradigm because it does not sell anything; it moves away from fierce competition and bets for cooperation.
- **Multicultural and inclusive**. Its an initiative with an international and multicultural vision. Its organic, always in constant mutation and change. It also actively demands compliance with human rights, respect for racial, sexual, and cultural diversity equality. And, of course, the equality between women and men.
- **Multicultural and inclusive**. It's an initiative with an international and multicultural vision. It's organic, always in constant mutation and change. It also actively demands compliance with human rights, respect for racial, sexual, and cultural diversity equality. And, of course, the equality between women and men.
- **Transparent**. The initiative is built on transparency, being one of the main values of AsyncAPI, internally and externally, including its financing. All the relevant data of the project is public. All tasks are public, with participation and communication handled through Slack and GitHub.
- **Horizontal and participative**. Its structure is based on horizontality; most of the decisions are defined as a group, including the Community. Anyone can submit improvements, lines of action, or elements to be taken into account to strengthen AsyncAPI.
- **User-friendly**. AsyncAPI bets for a seamless API development experience. Users should be able to create their first API even without prior knowledge of AsyncAPI. It has to be natural, simple, and intuitive.
Expand All @@ -92,9 +92,9 @@ All the information about the project's economy, the amount of the donations, th
- [**Twitter**](https://twitter.com/asyncapispec?lang=es): It's used for disseminating all news and information regarding the project, resolving user queries, and sharing the latest updates within AsyncAPI.
- [**Slack workspace**](https://www.asyncapi.com/slack-invite): The main place of encounter for the whole community of AsyncAPI.
- [**Newsletter**](https://www.asyncapi.com/newsletter): To learn about the status of the project, news, actualizations, recorded events, and meetings.
- [**Blog**](https://www.asyncapi.com/blog): Its used to disseminate information related to the project. It's also open to collaborations.
- [**LinkedIn**](https://es.linkedin.com/company/asyncapi): It's used to publish news related to the project or its environment. Its also used as a source of information.
- [**YouTube Channel**](https://www.youtube.com/playlist?list=PLbi1gRlP7pijUwZJErzyYf_Rc-PWu4lXS"): Where you can find conferences, AsyncAPI Open Meetings, and much more.
- [**Blog**](https://www.asyncapi.com/blog): It's used to disseminate information related to the project. It's also open to collaborations.
- [**LinkedIn**](https://es.linkedin.com/company/asyncapi): It's used to publish news related to the project or its environment. It's also used as a source of information.
- [**YouTube Channel**](https://www.youtube.com/playlist?list=PLbi1gRlP7pijUwZJErzyYf_Rc-PWu4lXS): Where you can find conferences, AsyncAPI Open Meetings, and much more.
- [**GitHub**](https://github.com/asyncapi): Issues (bugs, feature requests, etc.) and pull requests (PRs) for fixes or new features already discussed, as per the contributing guidelines.
- [**AsyncAPI Open Meetings**](https://github.com/asyncapi): AsyncAPI hosts different meetings every week. They are focused on different topics, sometimes purely technical and sometimes about community building. Pick one and join us! [Learn more about our meetings](/community/meetings)

Expand Down
12 changes: 8 additions & 4 deletions scripts/dashboard/build-dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,14 @@ function getLabel(issue, filter) {
}

function monthsSince(date) {
const seconds = Math.floor((new Date() - new Date(date)) / 1000);
// 2592000 = number of seconds in a month = 30 * 24 * 60 * 60
const months = seconds / 2592000;
return Math.floor(months);
const now = new Date();
const then = new Date(date);
const months = (now.getFullYear() - then.getFullYear()) * 12 + (now.getMonth() - then.getMonth());
// If the date hasn't reached the same day of the month, subtract one month
if (now.getDate() < then.getDate()) {
return months - 1;
}
return months;
}

async function start(writePath) {
Expand Down
8 changes: 8 additions & 0 deletions tests/build-pages.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,17 @@ describe('copyAndRenameFiles', () => {
test('should create a directory if it does not exist', () => {
const NEW_TEST_DIR = 'testDir';

// Clean up directory if it exists before test
if (fs.existsSync(NEW_TEST_DIR)) {
fs.rmdirSync(NEW_TEST_DIR);
}

expect(fs.existsSync(NEW_TEST_DIR)).toBe(false);
ensureDirectoryExists(NEW_TEST_DIR);
expect(fs.existsSync(NEW_TEST_DIR)).toBe(true);

// Clean up after test
fs.rmdirSync(NEW_TEST_DIR);
});

});
Loading