Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(.github): Create generate-openapi-code-from-typespec #746

Merged
merged 4 commits into from
Oct 26, 2024

Conversation

creatorrr
Copy link
Contributor

@creatorrr creatorrr commented Oct 25, 2024

Important

Add GitHub Actions workflow to generate OpenAPI code from TypeSpec, with environment setup and caching.

  • Workflow:
    • New GitHub Actions workflow generate-openapi-code-from-typespec added.
    • Triggers on pull_request and push events.
  • Environment Setup:
    • Uses actions/setup-python@v5 to set Python 3.12.
    • Uses actions/setup-node@v4 to set up Node.js with npm caching.
    • Configures Poetry with snok/install-poetry@v1 and sets virtualenvs in-project.
  • Caching:
    • Caches Poetry virtualenv in agents-api/.venv using actions/cache@v4.
  • Code Generation:
    • Runs scripts/generate_openapi_code.sh to generate OpenAPI code.

This description was created by Ellipsis for 25acd5b. It will automatically update as commits are pushed.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

❌ Changes requested. Reviewed everything up to 25acd5b in 31 seconds

More details
  • Looked at 62 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 drafted comments based on config settings.
1. .github/workflows/generate-openapi-code-from-typespec:5
  • Draft comment:
    Consider uncommenting and using the 'paths' filter to trigger the workflow only for changes in relevant directories, such as 'typespec/**'.
  • Reason this comment was not posted:
    Comment was on unchanged code.
2. .github/workflows/generate-openapi-code-from-typespec:25
  • Draft comment:
    Using 'latest' for node-version can lead to unexpected issues. Consider specifying a specific version or a major version range.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable:
    Using 'latest' for node-version can indeed lead to unexpected issues if a new version of Node.js introduces breaking changes. Specifying a specific version or a major version range can provide more stability. This is a valid concern and suggests a clear code change that could improve the workflow's reliability.
    The comment might be seen as speculative since it assumes potential issues without evidence of them occurring. However, it is a common best practice to avoid using 'latest' for dependencies in CI/CD workflows.
    While the comment is somewhat speculative, it is grounded in a common best practice that can prevent future issues, making it a valid suggestion for improvement.
    The comment is valid as it suggests a best practice to prevent potential issues with using 'latest' for node-version. It should be kept.

Workflow ID: wflow_6Lgpe21cyAzBIKBS


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

.github/workflows/generate-openapi-code-from-typespec Outdated Show resolved Hide resolved
@creatorrr creatorrr merged commit 4f50d9e into dev Oct 26, 2024
6 checks passed
@creatorrr creatorrr deleted the f/openapi-code-action branch October 26, 2024 03:06
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