Git Product home page Git Product logo

Comments (6)

tumata avatar tumata commented on July 17, 2024 4

Adding this part is giving me error "fatal: Not a valid object name master"
DIFF_BASE: ${{ github.base_ref }}

from action-swiftlint.

norio-nomura avatar norio-nomura commented on July 17, 2024 2

Providing paths to SwiftLint via commandline will override .swiftlint.yml.
If you use excluded, you may be able to solve it using the --force-exclude option:

       - name: GitHub Action for SwiftLint (Only files changed in the PR)
         uses: norio-nomura/action-swiftlint
         with:
           args: --force-exclude
         env:
           DIFF_BASE: ${{ github.base_ref }}

from action-swiftlint.

zntfdr avatar zntfdr commented on July 17, 2024 1

Thank you again Norio-san, it seems to be working now 🙌

from action-swiftlint.

zntfdr avatar zntfdr commented on July 17, 2024

from action-swiftlint.

badrinathvm avatar badrinathvm commented on July 17, 2024

This solution works, Thank you so much.

from action-swiftlint.

henry2423 avatar henry2423 commented on July 17, 2024

Adding this part is giving me error "fatal: Not a valid object name master"
DIFF_BASE: ${{ github.base_ref }}

@tumata, I fetch the base ref manually. And use my custom action-swiftlint, which check the changed files between HEAD(set from actions/checkout, a merged PR) and base_ref(master). It works for me.

...
on: pull_request
...
      - uses: actions/checkout@v2
      - name: Fetch base ref
        run: |
          git fetch --prune --no-tags --depth=1 origin +refs/heads/${{ github.base_ref }}:refs/heads/${{ github.base_ref }}
      - name: SwiftLint (Only files changed in the PR)
        uses: henry2423/action-swiftlint@Fix-PR-Lint
        with:
          args: --force-exclude --strict
        env:
           DIFF_BASE: ${{ github.base_ref }}
           DIFF_HEAD: HEAD

from action-swiftlint.

Related Issues (20)

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.