getsentry / action-eslint-fix Goto Github PK
View Code? Open in Web Editor NEWGitHub Action to run `eslint` with `--fix` option and commit fixes
License: MIT License
GitHub Action to run `eslint` with `--fix` option and commit fixes
License: MIT License
Getting the following error when running the action. Any idea what's missing?
Run getsentry/action-eslint-fix@019e40047bc28cbe8c2c12073d37365737182ad4
with:
dry: false
env:
GITHUB_TOKEN: ***
Error: Parameter token or opts.auth is required
code -
name: Automatic Lint Fixes
on:
issue_comment:
types:
- created
jobs:
eslint:
name: eslint
if: github.event.issue.pull_request && github.event.comment.body == '/eslint'
runs-on: ubuntu-20.04
steps:
- name: Automatic Lint Fix
uses: getsentry/action-eslint-fix@019e40047bc28cbe8c2c12073d37365737182ad4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Using as per the README
:
Run getsentry/action-eslint-fix@v1
/usr/bin/git diff-tree --diff-filter=d --no-commit-id --name-only -r 1c03b8894ada39b63e7d519121d73aca146c0461 4219b3c8d21b0bb64430a868b424cae5684d58c0
fatal: bad object 1c03b8894ada39b63e7d519121d73aca146c0461
##[error]fatal: bad object 1c03b8894ada39b63e7d519121d73aca146c0461
Tests run from my PR which integrates this, but seems like it's failing at eslint
step. Not sure why ๐ค
What am I missing?
ubuntu-latest
How do you use Sentry? No
Sentry SaaS (sentry.io) or self-hosted/on-premise (which version?)
Which SDK and version?
e.g: JavaScript 5.11.1, .NET 1.2.0
lintFix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install modules
run: npm install
- name: Use current action
uses: getsentry/action-eslint-fix@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
"style(): Auto eslint fix"
to appear in the commit history for my PR
None
What actually happened. Maybe a screenshot/recording? Maybe some logs?
No error. Everything went smoothly in the logs
The action succeeds as intended.
Specifically on that section of the action, the logs show:
Run getsentry/action-eslint-fix@v1
with:
GITHUB_TOKEN: ***
dry: false
Error: Cannot read property 'number' of undefined
I'm not sure if the issue is code related or not - so here's a (snippet) of the workflow:
deploy-dev:
if: github.ref == 'refs/heads/dev' && github.event.head_commit.message != 'WIP'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Update Submodules
run: git submodule update --recursive --remote
- name: Init new repo
run: git init
- name: Clone Submodules
run: git clone https://github.com/Status-Plus/Status-Plus-Translation.git --recursive
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
- run: npm install
- run: npm run test
- name: Use current action
uses: getsentry/action-eslint-fix@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Caprover Deploy
uses: AlexxNB/caprover-action@v1
with:
server: [REDACTED]
password: [REDACTED]
appname: [REDACTED]
branch: 'dev'
- uses: actions/checkout@v2
- name: Create Sentry release
uses: getsentry/action-release@v1
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
with:
environment: canary
ignore_missing: true
ignore_empty: true
Unsure if this is at all related or not - but thought I'd drop it here anyway.
I wonder if it is related to the fact that I am running npm install
earlier in the workflow? Not too sure, but it's possible this is causing it.
A feature that would be nice is slightly better error logging, I have no idea that this at all is related to!
Thanks! ๐
The Github Marketplace Link for this action is 404-ing for me.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.