Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: trunk-io/trunk-action
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.1.12
Choose a base ref
...
head repository: trunk-io/trunk-action
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.1.13
Choose a head ref
  • 1 commit
  • 3 files changed
  • 1 contributor

Commits on Apr 4, 2024

  1. feat: continue on node package install failure (#236)

    ### Problem
    
    Currently, most of our check-on-prs/check nightly failures occur while
    installing node packages, for a variety of reasons. Right now, this
    causes the check to fail, and we report that "something went wrong".
    Instead, we may want to disable linters that depend on node-modules
    (specifically, stylelint and eslint) and lint the remaining files to
    report our best-effort results.
    
    Pros:
    - We would report some issues, and some issues is better than no issues
    - We wouldn't be erroring with a message that seems like an internal
    error (because for all we know right now, it could be)
    
    Cons:
    - A user could introduce a lint issue in the same PR as a breaking
    change to package.json and we would pass that PR
    - I am pretty sure that we don't have a great way of surfacing to the
    user that we're disabling eslint without writing an annoying amount of
    boilerplate to send the data through the cli through services back to
    github
      - We do log this in the action logs, but that's the most visible place
    
    ### Solution
    
    After talking with Sam about this, we figured the best solution is to
    disable the linters if we are auto-initing for the user, but not if the
    user has a trunk.yaml and therefore has deliberately opted to see ts/js
    issues.
    
    ### Testing
    
    Added a repo test for
    [prawn-test-staging-rw/node-packages-failure-test](https://github.com/prawn-test-staging-rw/node-packages-failure-test/tree/main)
    that has an invalid package.json, and checks to make sure the action
    disables eslint and stylelint, and continues after the failure.
    puzzler7 authored Apr 4, 2024
    Configuration menu
    Copy the full SHA
    da67635 View commit details
    Browse the repository at this point in the history
Loading