wearerequired / lint-action

✨ GitHub Action for detecting and auto-fixing lint errors
MIT License
571 stars 138 forks source link

Action fails after v1.11.0 #376

Closed matheusalano closed 2 years ago

matheusalano commented 2 years ago

Hey there.

Our pipeline started failing yesterday (even though we didn't change anything) and we believe it's related to the latest version of your action (v1.11.0).

Run wearerequired/lint-action@v1 ``` 2022-01-10T21:44:39.4606674Z ##[group]Run wearerequired/lint-action@v1 2022-01-10T21:44:39.4607372Z with: 2022-01-10T21:44:39.4609091Z github_token: *** 2022-01-10T21:44:39.4609669Z swiftlint: true 2022-01-10T21:44:39.4610395Z swiftlint_args: --strict 2022-01-10T21:44:39.4611224Z swift_format_lockwood: true 2022-01-10T21:44:39.4611850Z swift_format_lockwood_args: --lint --verbose 2022-01-10T21:44:39.4612660Z continue_on_error: true 2022-01-10T21:44:39.4613232Z auto_fix: false 2022-01-10T21:44:39.4613718Z git_no_verify: false 2022-01-10T21:44:39.4615098Z git_name: Lint Action 2022-01-10T21:44:39.4615775Z git_email: lint-action@samuelmeuli.com 2022-01-10T21:44:39.4617965Z commit_message: Fix code style issues with ${linter} 2022-01-10T21:44:39.4619691Z check_name: ${linter} 2022-01-10T21:44:39.4620248Z neutral_check_on_warning: false 2022-01-10T21:44:39.4620847Z stylelint: false 2022-01-10T21:44:39.4621493Z stylelint_extensions: css,sass,scss 2022-01-10T21:44:39.4622234Z gofmt: false 2022-01-10T21:44:39.4622816Z gofmt_extensions: go 2022-01-10T21:44:39.4623354Z golint: false 2022-01-10T21:44:39.4623981Z golint_extensions: go 2022-01-10T21:44:39.4624548Z eslint: false 2022-01-10T21:44:39.4625125Z eslint_extensions: js 2022-01-10T21:44:39.4625638Z prettier: false 2022-01-10T21:44:39.4626996Z prettier_extensions: css,html,js,json,jsx,md,sass,scss,ts,tsx,vue,yaml,yml 2022-01-10T21:44:39.4729737Z xo: false 2022-01-10T21:44:39.4730395Z xo_extensions: js 2022-01-10T21:44:39.4730990Z php_codesniffer: false 2022-01-10T21:44:39.4731605Z php_codesniffer_extensions: php 2022-01-10T21:44:39.4732229Z black: false 2022-01-10T21:44:39.4736014Z black_extensions: py 2022-01-10T21:44:39.4736666Z flake8: false 2022-01-10T21:44:39.4737230Z flake8_extensions: py 2022-01-10T21:44:39.4738639Z mypy: false 2022-01-10T21:44:39.4739134Z mypy_extensions: py 2022-01-10T21:44:39.4739726Z oitnb: false 2022-01-10T21:44:39.4740311Z oitnb_extensions: py 2022-01-10T21:44:39.4740991Z rubocop: false 2022-01-10T21:44:39.4741559Z rubocop_extensions: rb 2022-01-10T21:44:39.4742077Z erblint: false 2022-01-10T21:44:39.4743112Z erblint_extensions: erb 2022-01-10T21:44:39.4743729Z swiftformat: false 2022-01-10T21:44:39.4744357Z swiftformat_extensions: swift 2022-01-10T21:44:39.4745060Z swift_format_lockwood_extensions: swift 2022-01-10T21:44:39.4745774Z swift_format_official: false 2022-01-10T21:44:39.4746407Z swift_format_official_extensions: swift 2022-01-10T21:44:39.4747090Z swiftlint_extensions: swift 2022-01-10T21:44:39.4747645Z env: 2022-01-10T21:44:39.4748290Z LINUX_SOURCEKIT_LIB_PATH: /usr/share/swift/usr/lib ```
Adding auth information to Git remote URL
Fetching remote branch "<branch_name>"
fatal: could not read Password for 'https://***@github.com': No such device or address
Error: Command failed: git fetch --no-tags --depth=1 origin <branch_name>
fatal: could not read Password for 'https://***@github.com': No such device or address

I wonder if there might be a bug in this latest version or if we should be sending new parameters to make the action work again.

Thanks!

coralvanda commented 2 years ago

I ran into the same thing. No problems with a PR the day before, suddenly my next one is stuck here.

janzipek commented 2 years ago

https://github.com/wearerequired/lint-action/blob/008a9f85f92c6d6d81b2b2f393bfad319941b901/src/git.js#L17 this is the culprit, should be cloneURl.password

CraigSiemens commented 2 years ago

I'm also curious if it needs to do anything with the Auth Token.

  1. The Usage from the readme shows using actions/checkout which by default persists the credentials for the repo so this shouldn't need to add them again.
  2. If the repo has already been checked out, is fetching the branch again even needed?
ocean90 commented 2 years ago

Thanks for the report, a fix has been released in v1.11.1.