Skip to content

Conversation

@ahastudio
Copy link
Member

@ahastudio ahastudio commented Apr 7, 2025

GitHub Actions를 이용해 Redoc API 문서도 만들고 배포.

References:

Summary by CodeRabbit

  • 새로운 기능
    • Todo 앱 및 Tickets API의 최신 HTML API 문서를 자동으로 생성합니다.
    • README 파일에 Redoc 문서 링크가 추가되었습니다.
  • 유지보수
    • Node.js 환경 설정과 Redocly CLI 설치가 자동으로 이루어집니다.
    • 배포 조건이 'main' 브랜치로 한정되어 일관된 배포가 이루어집니다.
    • 저장소에서 'public/' 디렉터리 추적이 제외되어 관리가 개선되었습니다.

GitHub Actions를 이용해 Redoc API 문서도 만들고 배포.

References:
- https://github.com/Redocly/redoc
- https://redocly.com/redoc
@ahastudio ahastudio requested a review from Copilot April 7, 2025 06:31
@coderabbitai
Copy link

coderabbitai bot commented Apr 7, 2025

Walkthrough

이번 PR은 GitHub Actions 워크플로우에 Node.js 환경 설정 단계와 Redocly CLI를 통한 API 문서 생성 단계를 추가합니다. 또한, Todo App 및 Tickets API의 OpenAPI 스펙으로부터 HTML 문서를 생성하는 새로운 명령어 호출이 추가되었으며, 배포 조건이 'main' 브랜치에서만 실행되도록 조정되었습니다. 한편, .gitignore 파일에 public/ 디렉토리를 추가하여 해당 경로가 Git에 포함되지 않도록 설정했습니다.

Changes

파일 변경 내용
.github/workflows/build-and-deploy.yml Node.js 환경 설정 단계, Redocly CLI 전역 설치, Todo App 및 Tickets API에 대한 Redoc API 문서 생성 단계 추가, 배포 조건 변경
.gitignore public/ 디렉토리 추가하여 Git 버전 관리에서 제외
tickets/README.md Redoc 문서 링크 추가
todo-app/README.md Redoc 문서 링크 추가

Possibly related PRs

Poem

나는 귀여운 토끼, 코드의 숲을 달려요,
새로운 Node.js와 문서로 반짝이는 길을 열어요.
Redocly CLI가 길잡이가 되어주고,
Todo와 Tickets API의 이야기를 담아내요.
public은 조용히 숨어, 우리 비밀을 지켜요. 🐰
한 걸음씩, 함께 달리며 미래를 그려요!


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between af99dc6 and 9554904.

📒 Files selected for processing (2)
  • tickets/README.md (1 hunks)
  • todo-app/README.md (1 hunks)
✅ Files skipped from review due to trivial changes (2)
  • todo-app/README.md
  • tickets/README.md

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Hello @ahastudio, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

Summary of Changes

This pull request introduces a GitHub Actions workflow to generate and deploy Redoc API documentation, as described in the PR title and description. The change adds public/ to the .gitignore file, presumably to exclude the generated documentation from being tracked by Git.

Highlights

  • Redoc API Documentation: Implements a GitHub Actions workflow for generating and deploying Redoc API documentation.
  • .gitignore update: Adds public/ to .gitignore to exclude generated documentation files.

Changelog

  • .gitignore
    • Added public/ to exclude the generated documentation directory.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.


From OpenAPI,
A Redoc site takes its form,
Docs now spring to life.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

The pull request introduces a GitHub Actions workflow to generate and deploy Redoc API documentation. This is a valuable addition to the project, enhancing its documentation capabilities. The change itself is quite minimal, adding a single line to the .gitignore file.

Merge Readiness

The pull request is a small but useful addition. Since the change is limited to adding a line to .gitignore, it's unlikely to introduce any issues. I am unable to directly approve the pull request, and other reviewers should review and approve this code before merging. Given the nature of the change, it seems reasonable to merge after another review.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

.github/workflows/build-and-deploy.yml:42

  • [nitpick] If the intent is to restrict the entire deployment job to the main branch, consider moving the condition to the job level rather than applying it only on the deployment step.
if: github.ref == 'refs/heads/main'

- name: Set up Node.js
uses: actions/setup-node@v4
- name: Install Redocly CLI
run: npm install -g @redocly/cli@latest
Copy link

Copilot AI Apr 7, 2025

Choose a reason for hiding this comment

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

Consider pinning the Redocly CLI version instead of using @latest to ensure reproducible builds and avoid unexpected issues in the future.

Suggested change
run: npm install -g @redocly/cli@latest
run: npm install -g @redocly/cli@1.0.0

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

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

버전을 명시할 거면 차라리 진짜 최신 버전인 1.34.1을 쓰는 게 어때?

@ahastudio ahastudio requested a review from Copilot April 7, 2025 06:36
@ahastudio
Copy link
Member Author

/gemini review

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request automates the generation and deployment of Redoc API documentation using GitHub Actions. It includes updates to README files to include links to the Redoc documentation and excludes the public/ directory from being tracked in the repository. Overall, this is a good enhancement to improve API documentation accessibility.

Merge Readiness

The pull request is ready to be merged. The changes are straightforward and improve the accessibility of API documentation. I am unable to directly approve the pull request, and recommend that others review and approve this code before merging.

@ahastudio ahastudio merged commit c7d5332 into dal-lab:main Apr 7, 2025
2 checks passed
@ahastudio ahastudio deleted the redoc branch April 7, 2025 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant