Coder Social home page Coder Social logo

jira-tools / action-jira-linter Goto Github PK

View Code? Open in Web Editor NEW
10.0 1.0 12.0 1.53 MB

A light-weight lint workflow to unite the worlds of GitHub and Jira

Home Page: https://github.com/marketplace/actions/action-jira-linter

License: MIT License

JavaScript 77.58% TypeScript 22.17% Shell 0.26%
github jira pull-requests jira-issue workflow linter

action-jira-linter's People

Contributors

allcontributors[bot] avatar asbjornu avatar dependabot[bot] avatar lwaddicor avatar mergify[bot] avatar nasamin avatar nimeshjm avatar rheaditi avatar richardlhao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

action-jira-linter's Issues

Update action.yml to reference node 16

I've noticed jira-lint flagging and error on execution that node12 is deprecated. Do you maintain this repo and do you plan on updating the reference in action.yml to point to node 16? I tried to clone and push a branch but repo is secured.

Error: Input required and not supplied: jira-user

Despite having everything set up as per the README (everything is working for other actions that use Jira as well), I'm getting the error mentioned in the title. I'll take a look at the code and see if I can open up a PR but I can't promise anything

PR commit message is improperly formatted

Currently, the github "PR title is great" comment is improperly formatted. I guess tabs indentation = code block? (screenshot attached)

Screenshot 2023-03-09 at 1 07 58 PM

Changing these lines:
https://github.com/jira-tools/action-jira-linter/blob/6e2b0f4881edc98a9f12a507d8d6c31ef6256aad/src/github.ts#L121-L124C5
Using a </br> instead works properly

Solution:

<p>I'm a bot and I ๐Ÿ‘ this PR title. ๐Ÿค–</p></br><img src="https://media.giphy.com/media/XreQmk7ETCak0/giphy.gif" width="400" />

Failed on searching for invalid Jira issue key

When running the Jira linter on a branch named, 2023-04-11-245a825, the Jira linter incorrectly finds 11-245 to be the Jira issue key. This causes the action to fail as it cannot find a ticket matching the issue key in Jira.

We are aware the branch doesn't include a correct Jira issue key. However, this is a false positive as normally, the Jira linter would fail only if fail-on-error is set to true

Action logs:

Run jira-tools/[email protected]
  with:
    github-token: ***
    jira-token: ***
    jira-base-url: https://***/
    pr-threshold: 1000
    jira-user: ***
    validate-issue-status: true
    allowed-issue-statuses: New
  Reopened
  To Do
  In Progress
  Peer Review
  In Staging / QA
  Ready For Staging
  In Development Env
  Approved
  Resolved
  
    skip-branches: ^(main|development|staging|production|dev)$
    fail-on-error: false
    skip-comments: true
Base branch ->  development
Head branch ->  2023-04-11-245a825
branch '2023-04-11-245a825' is not a default branch and does not match ignore pattern provided in 'skip-branches' option: /^(main|development|staging|production|dev)$/
JIRA key -> 11-245
{
  error: [AxiosError: Request failed with status code 404] {
    code: 'ERR_BAD_REQUEST',
    config: {
      transitional: [Object],
      adapter: [Function: httpAdapter],
      transformRequest: [Array],
      transformResponse: [Array],
      timeout: 2000,
      xsrfCookieName: 'XSRF-TOKEN',
      xsrfHeaderName: 'X-XSRF-TOKEN',
      maxContentLength: -1,
      maxBodyLength: -1,
      env: [Object],
      validateStatus: [Function: validateStatus],
      headers: [Object],
      baseURL: 'https://***/rest/api/3',
      method: 'get',
      url: '/issue/11-245?fields=project,summary,issuetype,labels,status,customfield_10016',
      data: undefined
    },
    request: ClientRequest {
      _events: [Object: null prototype],
      _eventsCount: 7,
      _maxListeners: undefined,
      outputData: [],
      outputSize: 0,
      writable: true,
      _last: true,
      chunkedEncoding: false,
      shouldKeepAlive: false,
      _defaultKeepAlive: true,
      useChunkedEncodingByDefault: false,
      sendDate: false,
      _removedConnection: false,
      _removedContLen: false,
      _removedTE: false,
      _contentLength: 0,
      _hasBody: true,
      _trailer: '',
      finished: true,
      _headerSent: true,
      socket: [TLSSocket],
      connection: [TLSSocket],
      _header: 'GET /rest/api/3/issue/11-245?fields=project,summary,issuetype,labels,status,customfield_10016 HTTP/1.1\r\n' +
        'Accept: application/json, text/plain, */*\r\n' +
        'authorization: Basic YW11X2RlcGxveUBhbXVuaXZlcnNhbC5jb206***\r\n' +
        'User-Agent: axios/0.27.2\r\n' +
        'Host: ***\r\n' +
        'Connection: close\r\n' +
        '\r\n',
      _keepAliveTimeout: 0,
      _onPendingData: [Function: noopPendingOutput],
      agent: [Agent],
      socketPath: undefined,
      method: 'GET',
      insecureHTTPParser: undefined,
      path: '/rest/api/3/issue/11-245?fields=project,summary,issuetype,labels,status,customfield_10016',
      _ended: true,
      res: [IncomingMessage],
      aborted: false,
      timeoutCb: null,
      upgradeOrConnect: false,
      parser: null,
      maxHeadersCount: null,
      reusedSocket: false,
      host: '***',
      protocol: 'https:',
      _redirectable: [Writable],
      [Symbol(kCapture)]: false,
      [Symbol(kNeedDrain)]: false,
      [Symbol(corked)]: 0,
      [Symbol(kOutHeaders)]: [Object: null prototype]
    },
    response: {
      status: 404,
      statusText: 'Not Found',
      headers: [Object],
      config: [Object],
      request: [ClientRequest],
      data: [Object]
    }
  }
}
Error: Request failed with status code 404

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.