Skip to content

Commit

Permalink
style: improve styling across the board
Browse files Browse the repository at this point in the history
  • Loading branch information
dependabot[bot] authored and vitorhugods committed Apr 29, 2024
1 parent 91fc6db commit 7e4f663
Show file tree
Hide file tree
Showing 12 changed files with 190 additions and 326 deletions.
4 changes: 4 additions & 0 deletions .github/linters/.eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,7 @@ rules:
'@typescript-eslint/type-annotation-spacing': 'error',
'@typescript-eslint/unbound-method': 'error'
}

settings:
import/resolver:
typescript: {}
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
## Automatic cherry-picking

Cherry-picks commits from a merged PR, creating a new PR to a target branch.
Allows setting a name of a submodule and will automatically fast-forward it to also match the `target-branch`.
Allows setting a name of a submodule and will automatically fast-forward it to
also match the `target-branch`.

Check [action.yml](action.yml) for a description of inputs and outputs.

Expand Down Expand Up @@ -31,7 +32,7 @@ jobs:
uses: ./
with:
target-branch: 'develop' # Branch which will receive the automatic cherry-picks

- name: Get the output
run:
echo "The created PR number is ${{
Expand Down
12 changes: 6 additions & 6 deletions __tests__/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@ import * as main from '../src/main'
const runMock = jest.spyOn(main, 'run')

// Mock the GitHub Actions core library
let debugMock: jest.SpiedFunction<typeof core.debug>
let errorMock: jest.SpiedFunction<typeof core.error>
// let debugMock: jest.SpiedFunction<typeof core.debug>
// let errorMock: jest.SpiedFunction<typeof core.error>
let getInputMock: jest.SpiedFunction<typeof core.getInput>
let setFailedMock: jest.SpiedFunction<typeof core.setFailed>
let setOutputMock: jest.SpiedFunction<typeof core.setOutput>
// let setOutputMock: jest.SpiedFunction<typeof core.setOutput>

describe('action', () => {
beforeEach(() => {
jest.clearAllMocks()

debugMock = jest.spyOn(core, 'debug').mockImplementation()
errorMock = jest.spyOn(core, 'error').mockImplementation()
// debugMock = jest.spyOn(core, 'debug').mockImplementation()
// errorMock = jest.spyOn(core, 'error').mockImplementation()
getInputMock = jest.spyOn(core, 'getInput').mockImplementation()
setFailedMock = jest.spyOn(core, 'setFailed').mockImplementation()
setOutputMock = jest.spyOn(core, 'setOutput').mockImplementation()
// setOutputMock = jest.spyOn(core, 'setOutput').mockImplementation()
})

// TODO: Add further testing. Mock the github context somehow
Expand Down
1 change: 1 addition & 0 deletions badges/coverage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
76 changes: 37 additions & 39 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit 7e4f663

Please sign in to comment.