Git Product home page Git Product logo

spell-checker's People

Contributors

bubkoo avatar

Forkers

munapower

spell-checker's Issues

Error: "HttpError: Resource not accessible by integration" when using github action

Expected Behavior

Spell checking should be performed on file README.md

Current Behavior

There is an HTTP Error returned instead

Possible Solution

Can this be related to this issue octokit/rest.js#32 ? It seems octokit was updated after you published this action

Steps To Reproduce

  1. Create a job with a step that invokes the github action
  2. Modify a markdown file
  3. Push to repo
Error Message & Stack Trace

<!-- Provide a log message if relevant -->

0s
##[debug]Evaluating condition for step: 'Spell Check'
##[debug]Evaluating: success()
##[debug]Evaluating success:
##[debug]=> true
##[debug]Result: true
##[debug]Starting: Spell Check
##[debug]Loading inputs
##[debug]Evaluating: secrets.GITHUB_TOKEN
##[debug]Evaluating Index:
##[debug]..Evaluating secrets:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'GITHUB_TOKEN'
##[debug]=> ''
##[debug]Result: '
'
##[debug]Loading env
Run wow-actions/spell-checker@v1
Base commit: 6514d77e896c56076ac3a36614ee75a0cc5772ba
Head commit: 1b6cc0905170110310db3f92ca45d76fd2321cd8
##[debug]changed files: [
##[debug] "README.md"
##[debug]]
checking files: [
"README.md"
]
Error: HttpError: Resource not accessible by integration
Error: Resource not accessible by integration
##[debug]Node Action run completed with exit code 1
##[debug]Finishing: Spell Check

Additional Context

Your Environment

We have a github action that only runs if the changes are only markdown files. We want to spell check these files. I am testing this on a branch and only made changes to the readme file. Basically added "wong wods foget" to the file to see if the spell checker could catch them.

  • x6: [e.g. 1.0.0]
  • OS: [e.g. macOS Sierra 10.12.3]
  • Browser: [e.g. chrome 78.0.3904.108]
    This is my yaml:
name: Check Documentation
on:
  push:
    paths:
    - '**.md'
defaults:
  run:
    shell: bash
#permissions: {}
jobs:
  check-md-only:
    name: This job was triggered
    runs-on: ubuntu-latest
    outputs:
      md-only: ${{ steps.test-md-only.outputs.md-only }}
    permissions:
        contents: read
    steps:
    - name: Checkout
      uses: actions/checkout@v3
      with:
        fetch-depth: 2 # required to compare HEAD^
    - run: git diff --name-only HEAD^..HEAD
    - name: Test MD only
      id: test-md-only
      run: >-
        [ -z "$(git diff --name-only HEAD^..HEAD | grep -ve "\.md$")" ] &&
        echo "md-only=${{toJSON(true)}}" >> $GITHUB_OUTPUT ||
        echo "md-only=${{toJSON(false)}}" >> $GITHUB_OUTPUT
  build:
    name: Run if only MD files
    needs: ['check-md-only']
    runs-on: ubuntu-latest
    if: ${{ fromJSON(needs.check-md-only.outputs.md-only) == true }}
    steps:
    - run: echo ran
    - name: Spell Check
      uses: wow-actions/spell-checker@v1
      with:
         GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
         include: |
            **/*.md

Return an output for following jobs/steps to use

Expected Behavior

When the action is run, it always returns success, and in the description it explains if it was Good Spelling or Perfect Spelling. It would be convenient to be able to use the output for the user to determine potential next steps, for example, if they want to fail the job.

Possible Solution

Adding outputs to the action.yml and then add at the end of the run the instructions to core.setOuput ...

Additional Context

image The Spell Checker was actually defined as a step in a job but it runs as a separate job, which I don't mind, but I do need to get the output.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.