Coder Social home page Coder Social logo

agiledigital / jiralint Goto Github PK

View Code? Open in Web Editor NEW
7.0 10.0 3.0 1.64 MB

A library and supporting CLI tool for linting deliveries, issues and people as they manifest in Jira.

JavaScript 4.00% TypeScript 95.84% Shell 0.16%
jira jira-rest-api linter

jiralint's People

Contributors

danielnixon avatar dbalmain avatar dependabot[bot] avatar dspasojevic avatar jadehong99 avatar renovate-bot avatar renovate[bot] avatar semantic-release-bot avatar snyk-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jiralint's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • chore(deps): update dependency @types/clui to v0.3.4
  • chore(deps): update dependency @types/oauth to v0.9.4
  • chore(deps): update dependency prettier to v2.8.8
  • fix(deps): update dependency io-ts to v2.2.21
  • chore(deps): update dependency eslint-config-prettier to v8.10.0
  • chore(deps): update dependency eslint-plugin-sonarjs to v0.25.1
  • chore(deps): update dependency fast-check to v3.17.1
  • chore(deps): update dependency node to 16.20
  • chore(deps): update dependency ts-essentials to v9.4.2
  • chore(deps): update dependency ts-jest to v29.1.2
  • chore(deps): update dependency type-coverage to v2.28.1
  • chore(deps): update jest monorepo (@types/jest, jest)
  • chore(deps): update typescript-eslint monorepo to v5.62.0 (@typescript-eslint/eslint-plugin, @typescript-eslint/parser)
  • fix(deps): update dependency date-fns to v2.30.0
  • fix(deps): update dependency fp-ts to v2.16.5
  • fix(deps): update dependency inquirer to v8.2.6
  • fix(deps): update dependency yargs to v17.7.2
  • chore(deps): update actions/cache action to v4
  • chore(deps): update actions/checkout action to v4
  • chore(deps): update actions/setup-node action to v4
  • chore(deps): update dependency eslint to v8.57.0
  • chore(deps): update dependency eslint to v9
  • chore(deps): update dependency eslint-config-agile-digital to v3
  • chore(deps): update dependency eslint-config-prettier to v9
  • chore(deps): update dependency eslint-config-typed-fp to v5
  • chore(deps): update dependency eslint-plugin-functional to v5.0.8
  • chore(deps): update dependency eslint-plugin-functional to v6
  • chore(deps): update dependency eslint-plugin-jest to v27.9.0
  • chore(deps): update dependency eslint-plugin-jest to v28
  • chore(deps): update dependency eslint-plugin-prettier to v5
  • chore(deps): update dependency eslint-plugin-total-functions to v6.10.7
  • chore(deps): update dependency eslint-plugin-total-functions to v7
  • chore(deps): update dependency husky to v9
  • chore(deps): update dependency node to v20
  • chore(deps): update dependency prettier to v3
  • chore(deps): update dependency rollup to v4
  • chore(deps): update dependency tsconfig-paths-webpack-plugin to v4
  • chore(deps): update dependency typescript to v5
  • chore(deps): update typescript-eslint monorepo (major) (@typescript-eslint/eslint-plugin, @typescript-eslint/parser)
  • fix(deps): update dependency date-fns to v3
  • fix(deps): update dependency string-length to v6
  • fix(deps): update dependency ts-pattern to v5
  • ๐Ÿ” Create all rate-limited PRs at once ๐Ÿ”

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/build-test-release.yml
  • actions/checkout v3
  • actions/setup-node v3
  • actions/cache v3
npm
cli/package.json
  • clear 0.1.0
  • clui 0.3.6
  • colors 1.4.0
  • date-fns 2.29.3
  • fp-ts 2.13.1
  • inquirer 8.2.4
  • io-ts 2.2.20
  • io-ts-types 0.5.19
  • monocle-ts 2.3.13
  • newtype-ts 0.3.5
  • oauth 0.10.0
  • readonly-types 4.5.0
  • string-length 4.0.2
  • ts-pattern 4.2.1
  • yargs 17.5.1
  • @types/clear 0.1.2
  • @types/clui 0.3.1
  • @types/inquirer 7.3.3
  • @types/jest 29.4.0
  • @types/oauth 0.9.1
  • @typescript-eslint/eslint-plugin 5.54.1
  • @typescript-eslint/parser 5.54.1
  • eslint 8.35.0
  • eslint-config-agile-digital ^2.6.0
  • eslint-config-prettier 8.7.0
  • eslint-config-typed-fp 4.4.0
  • eslint-plugin-functional 5.0.5
  • eslint-plugin-jest 27.2.1
  • eslint-plugin-prettier 4.2.1
  • eslint-plugin-sonarjs 0.18.0
  • eslint-plugin-total-functions 6.3.0
  • jest 29.5.0
  • prettier 2.8.4
  • rollup 2.79.0
  • rollup-plugin-cleanup 3.2.1
  • rollup-plugin-delete 2.0.0
  • rollup-plugin-typescript2 0.33.0
  • ts-jest 29.0.5
  • tsconfig-paths-webpack-plugin 4.0.0
  • type-coverage 2.24.1
  • typescript 4.9.5
  • node >=10
lib/package.json
  • colors ^1.4.0
  • date-fns ^2.29.3
  • fp-ts ^2.13.1
  • io-ts ^2.2.20
  • io-ts-types ^0.5.19
  • jira-client ^6.21.1
  • monocle-ts ^2.3.13
  • newtype-ts ^0.3.5
  • oauth ^0.10.0
  • readonly-types ^4.5.0
  • ts-pattern ^3.2.2
  • io-ts-reporters 2.0.1
  • @semantic-release/git 9.0.1
  • @types/jest 29.4.0
  • @types/jira-client 6.21.3
  • @types/oauth 0.9.1
  • @typescript-eslint/eslint-plugin 5.54.1
  • @typescript-eslint/parser 5.54.1
  • eslint 8.35.0
  • eslint-config-agile-digital ^2.6.0
  • eslint-config-prettier 8.7.0
  • eslint-config-typed-fp 4.4.0
  • eslint-plugin-functional 5.0.5
  • eslint-plugin-jest 27.2.1
  • eslint-plugin-prettier 4.2.1
  • eslint-plugin-sonarjs 0.18.0
  • eslint-plugin-total-functions 6.3.0
  • jest 29.5.0
  • prettier 2.8.4
  • semantic-release 19.0.5
  • ts-jest 29.0.5
  • type-coverage 2.24.1
  • typescript 4.9.5
  • ts-essentials 9.3.1
  • node >=10
package.json
  • io-ts-reporters ^2.0.1
  • semantic-release 19.0.5
  • ts-node ^10.9.1
  • @commitlint/cli 13.2.1
  • @commitlint/config-conventional 13.2.0
  • commitizen 4.3.0
  • cz-conventional-changelog 3.3.0
  • eslint-config-agile-digital ^2.6.0
  • fast-check 3.7.1
  • husky 7.0.4
  • node >=10
nvm
.nvmrc
  • node 16.17

  • Check this box to trigger a request for Renovate to run again on this repository

Publish lib package to GPR automatically

Now that jiralint-pulumi is consuming the lib package from this repo via a true npm package (private; Github Package Registry), it would be good to automatically publish that package upon release of this repo (via github action, probably).

This will probably involve:

  1. in the CI github action: publish the npm package. The ambient GITHUB_TOKEN should give you permission to do this. The action at https://github.com/cycjimmy/semantic-release-action looks promising for this. If that action doesn't work, fall back on doingnpm publish manually (https://docs.npmjs.com/cli/v6/commands/npm-publish). Ensure you're publishing to the private Github Package Registry associated with this repo, not the public npm registry
  2. do the above step only for main branch and/or only for release tags

If that doesn't work, we may have to use a machine user and a corresponding PAT:

  1. provision a machine user (https://docs.github.com/en/developers/overview/managing-deploy-keys)
  2. crete a PAT for that machine user that is permitted to publish packages (https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token)
  3. store that PAT in a github secret for this repo (https://github.com/agiledigital-labs/jiralint/settings/secrets/actions)
  4. in the CI github action: move that PAT where it needs to be so npm publish uses it (cf. https://github.com/agiledigital-labs/jiralint-pulumi/blob/main/.github/workflows/build-test.yml#L28)
  5. then as above

Command line arg parsing is broken?

At some point we introduced a .jiralintrc config file. This is cool, but I think we've accidentally broken the (now rarely used?) old command line version of the same options.

Even when I specify the host using -h or --jira.host, I still get:

Missing required arguments: jira.host, jira.consumerSecret

Add CI build

  • build, lint, and test action
  • semantic release to save dist bundle to github

Use Jira Expressions

Evaluate the use of Jira Expressions instead of the current approach to fetch the data.

v3 of the plain REST APIs store descriptions as structured JSON objects instead of wikitext, so eventually a different approach (like Jira Expressions) will be necessary.

Tweak description rule

Some projects use custom description fields so that templates can be used.

Permit configuration of those description fields (a map of type -> custom field(s)) and check those as well.

Support for 'cloud' Jira.

jiralint currently only support on-prem Jira ("Jira Server"). We want to continue to benefit from it as we migrate to Jira Cloud.

IPASIP-2436 can not be parsed

Failed to decode issues [[\"Invalid value null supplied to : Readonly<Array<({ key: string, self: string, fields: ({ summary: string, description: fromNullable((string | undefined)), created: ReadonlyDate from ISO string, project: { key: string }, timetracking: fromNullable(Partial<{ originalEstimateSeconds: number, timeSpentSeconds: number, remainingEstimateSeconds: number, originalEstimate: string, timeSpent: string }>), fixVersions: ReadonlyArray<{ id: string, name: string, released: boolean }>, aggregateprogress: { progress: fromNullable((number | undefined)), total: fromNullable((number | undefined)), percent: fromNullable((number | undefined)) }, issuetype: { name: string, subtask: boolean }, status: { id: string, name: string, statusCategory: { id: fromNullable((number | undefined)), name: fromNullable((string | undefined)), colorName: fromNullable((string | undefined)) } }, comment: fromNullable((Readonly<(Readonly<{ maxResults: number, total: number, startAt: number }> & { comments: ReadonlyArray<{ id: string, author: fromNullable(({ name: fromNullable((string | undefined)) } | undefined)), body: string, created: ReadonlyDate from ISO string, updated: ReadonlyDate from ISO string }> })> | undefined)), worklog: fromNullable((Readonly<(Readonly<{ maxResults: number, total: number, startAt: number }> & { worklogs: ReadonlyArray<{ author: { name: fromNullable((string | undefined)) }, started: ReadonlyDate from ISO string, timeSpentSeconds: number, comment: fromNullable((string | undefined)) }> })> | undefined)), duedate: fromNullable((DateFromISOString | undefined)) } & Partial<{ aggregatetimeestimate: fromNullable((number | undefined)), aggregatetimeoriginalestimate: fromNullable((number | undefined)), aggregatetimespent: fromNullable((number | undefined)), parent: { id: string, key: string } }> & Readonly<{ [K in string]: unknown }>), changelog: fromNullable({ histories: ReadonlyArray<{ id: string, author: { name: fromNullable((string | undefined)) }, created: ReadonlyDate from ISO string, items: ReadonlyArray<{ field: string, fieldtype: string, from: (string | null), fromString: (string | null), to: (string | null), toString: (string | null) }> }> }) } & { fields: { assignee: { accountId: string, displayName: string } } })>>/0: ({ key: string, self: string, fields: ({ summary: string, description: fromNullable((string | undefined)), created: ReadonlyDate from ISO string, project: { key: string }, timetracking: fromNullable(Partial<{ originalEstimateSeconds: number, timeSpentSeconds: number, remainingEstimateSeconds: number, originalEstimate: string, timeSpent: string }>), fixVersions: ReadonlyArray<{ id: string, name: string, released: boolean }>, aggregateprogress: { progress: fromNullable((number | undefined)), total: fromNullable((number | undefined)), percent: fromNullable((number | undefined)) }, issuetype: { name: string, subtask: boolean }, status: { id: string, name: string, statusCategory: { id: fromNullable((number | undefined)), name: fromNullable((string | undefined)), colorName: fromNullable((string | undefined)) } }, comment: fromNullable((Readonly<(Readonly<{ maxResults: number, total: number, startAt: number }> & { comments: ReadonlyArray<{ id: string, author: fromNullable(({ name: fromNullable((string | undefined)) } | undefined)), body: string, created: ReadonlyDate from ISO string, updated: ReadonlyDate from ISO string }> })> | undefined)), worklog: fromNullable((Readonly<(Readonly<{ maxResults: number, total: number, startAt: number }> & { worklogs: ReadonlyArray<{ author: { name: fromNullable((string | undefined)) }, started: ReadonlyDate from ISO string, timeSpentSeconds: number, comment: fromNullable((string | undefined)) }> })> | undefined)), duedate: fromNullable((DateFromISOString | undefined)) } & Partial<{ aggregatetimeestimate: fromNullable((number | undefined)), aggregatetimeoriginalestimate: fromNullable((number | undefined)), aggregatetimespent: fromNullable((number | undefined)), parent: { id: string, key: string } }> & Readonly<{ [K in string]: unknown }>), changelog: fromNullable({ histories: ReadonlyArray<{ id: string, author: { name: fromNullable((string | undefined)) }, created: ReadonlyDate from ISO string, items: ReadonlyArray<{ field: string, fieldtype: string, from: (string | null), fromString: (string | null), to: (string | null), toString: (string | null) }> }> }) } & { fields: { assignee: { accountId: string, displayName: string } } })/1: { fields: { assignee: { accountId: string, displayName: string } } }/fields: { assignee: { accountId: string, displayName: string } }/assignee

feat: define some simple checks for individuals

Some ideas:

  1. the lint issues for any tickets that the individuals 'owns' that are being 'worked'
  2. number of issues being worked by the individual
  3. hours logged last business day
  4. hours logged this pay period vs expected hours logged this pay period

New rule: comment added within X hours of worklog

Our current comment checking rule requires a comment if:

  1. time has been logged AND the issue isn't closed
  2. OR the issue is in progress

A conceptually simpler rule is to require a comment whenever time has been logged. i.e a comment must be added "around" the same time that a worklog is added.

The check would look at:

  1. time of most recent worklog
  2. time of most recent comment

the rule would pass if the comment was <1d before the worklog or after it.

What makes it non-trivial is that worklogs and comments are both paginated fields, so they may be truncated. Issues are currently retrieved using the search API. We need to do one of:

  1. see if those fields can be sorted so that we always get the most recent comment and worklog
  2. check search results and (if necessary) pull individual ticket comments and worklogs

Configurable columns in output

On my screen the Sign only showed the first letter.
being able to pick or truncate the columns would be nice to have.

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.