Skip to content

Commit 28ccec6

Browse files
authored
Merge pull request #25 from jonny64/issue_23
+0pdd
2 parents 7a1ade1 + 92189c1 commit 28ccec6

7 files changed

Lines changed: 23 additions & 1 deletion

File tree

.github/workflows/pdd.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: pdd
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
branches:
8+
- main
9+
jobs:
10+
pdd:
11+
runs-on: ubuntu-22.04
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: volodya-lombrozo/pdd-action@master

eslint.config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ const pluginJs = require("@eslint/js");
33
const pluginNoFloatingPromise = require("eslint-plugin-no-floating-promise");
44
const pluginSonarjs = require("eslint-plugin-sonarjs");
55

6+
// @todo #0:1h fix npx eslint . cause 'Warning: React version not specified in eslint-plugin-react settings.'
67
module.exports = [{
78
files: ["**/*.js"],
89
languageOptions: {
@@ -19,6 +20,7 @@ module.exports = [{
1920
"no-unused-vars": "off",
2021
"sonarjs/sonar-no-unused-vars": "off",
2122
"sonarjs/sonar-no-fallthrough": "off",
23+
"sonarjs/todo-tag": "off",
2224

2325
"no-floating-promise/no-floating-promise": "error",
2426
"sonarjs/cognitive-complexity": ["error", 15],

lib/GitBranch.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ const ShellCommand = require ('./ShellCommand')
33

44
module.exports = class GitBranch {
55

6+
// @todo #0:30m rename to withName
67
static createByName (id, gitRepo = new GitRepo ()) {
78
let [origin, name] = id.split ('/')
89
if (!name) {

lib/SwitchCommand.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ module.exports = class {
1616
{
1717
todo: `switch --merge --guess ${dst}`,
1818
fail: {
19+
// @todo #0:1h decompose to separate SwitchCommand and CreateCommand
20+
// then remove ugly fail fallback
1921
todo: `switch --guess --merge --create ${dst} ${src}`,
2022
confirm: `Create new branch '${dst}' from '${src}' [Y/n]? `,
2123
}

lib/UserInput.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11

22
const readline = require('readline')
33

4+
// @todo #0:1h add tests
5+
// @todo #0:1h press 'y' or 'n' without Enter should be sufficient
46
module.exports = class {
57
constructor(question) {
68
this.question = question

mr.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
const ParsedArgs = require('./lib/ParsedArgs')
33
const MrCommand = require('./lib/MrCommand')
44
const GitRepo = require('./lib/GitRepo')
5+
// @todo #0:30m move to lib/commands/Push, lib/commands/Switch, etc.
56
const RunCommand = require('./lib/RunCommand')
67
const Push = require('./lib/PushCommand')
78
const Switch = require('./lib/SwitchCommand')

tests/GitBranch.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const {describe, it, mock} = require ('node:test')
22
const assert = require ('assert')
33
const GitBranch = require ('../lib/GitBranch')
44

5-
5+
// @todo #0:1h improve file coverage at least funcs % 70
66
describe('git branch equals', () => {
77
let task42 = new GitBranch ({name: 'TASK-42', origin: 'origin'})
88
let task43 = new GitBranch ({name: 'TASK-43', origin: 'origin'})

0 commit comments

Comments
 (0)