Skip to content

Conversation

@mrubens
Copy link
Collaborator

@mrubens mrubens commented Feb 16, 2025

Trying this to see if it works from forks


Important

Switch from checks to commit statuses for Docusaurus build status updates and update action versions in docusaurus-build.yml.

  • Workflow Changes:
    • Switch from using checks.create to repos.createCommitStatus for updating build status in docusaurus-build.yml.
    • Add permissions section to allow writing statuses and reading contents.
  • Version Updates:
    • Update actions/checkout to v4 and actions/setup-node to v4.
    • Update Node.js version from 18 to 20.
    • Update actions/github-script to v7.

This description was created by Ellipsis for 18ca554. 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.

👍 Looks good to me! Reviewed everything up to 18ca554 in 1 minute and 17 seconds

More details
  • Looked at 63 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 6 drafted comments based on config settings.
1. .github/workflows/docusaurus-build.yml:33
  • Draft comment:
    Consider wrapping the commit status update API call in a try/catch block for better error handling. This ensures failures are logged and handled gracefully rather than possibly breaking the workflow.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50%
    GitHub Actions has built-in error handling - if a step fails, the whole workflow fails and reports the error. The actions/github-script action likely already handles API errors appropriately. Adding try/catch here would be redundant and add unnecessary complexity. The workflow is simple and focused.
    I could be wrong about the actions/github-script error handling behavior. There might be cases where graceful error handling is important for this specific status update.
    Looking at the actions/github-script documentation, it does handle errors properly - failed API calls will fail the workflow step with a clear error message. Adding try/catch would just obscure the default behavior.
    The comment should be deleted as it suggests unnecessary error handling in a context where errors are already handled appropriately by the GitHub Actions infrastructure.
2. .github/workflows/docusaurus-build.yml:46
  • Draft comment:
    Add a newline at the end of the file to adhere to common style guidelines.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 30% <= threshold 50%
    The comment is suggesting a style change, which is generally a good practice to follow. However, it doesn't directly relate to the specific rules provided, such as enforcing ESLint or Prettier, which would automatically handle such style issues. Therefore, this comment might not be necessary if those tools are in place.
3. .github/workflows/docusaurus-build.yml:45
  • Draft comment:
    Please add a trailing newline at the end of the file to conform with common style guidelines and prevent potential issues with some linters.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50%
    None
4. .github/workflows/docusaurus-build.yml:34
  • Draft comment:
    The step’s condition (if: github.event_name == 'pull_request') ensures the commit status update runs only on pull request events. Confirm this is intentional—if you also want to update status on push events, you may need to adjust the condition.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50%
    None
5. .github/workflows/docusaurus-build.yml:21
  • Draft comment:
    Upgrading to actions/setup-node@v4 and switching Node version to 20 is fine as long as all project dependencies are compatible with Node 20. Ensure this update has been validated in your project.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50%
    None
6. .github/workflows/docusaurus-build.yml:38
  • Draft comment:
    The commit status update using github.rest.repos.createCommitStatus via actions/github-script@v7 meets the requirement to use status instead of checks. Consider whether you need to incorporate error handling within this script for better resilience if the API call fails.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50%
    None

Workflow ID: wflow_GtT5VsYK5mDvonGp


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@mrubens mrubens merged commit 6143ec6 into main Feb 16, 2025
2 checks passed
@mrubens mrubens deleted the use_pr_status_instead_of_check branch February 16, 2025 18:33
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.

2 participants