Giter VIP home page Giter VIP logo

Comments (4)

psss avatar psss commented on September 23, 2024

Thanks for reporting the issue. I've tried with generating an empty list of issues but that works fine for me. Is there any specific config, user, gitlab instance or date range which triggers this? Does it happen for --issues-created, --issues-commented, --issues-closed or all of them?

from did.

Kuba314 avatar Kuba314 commented on September 23, 2024

@psss --gitlab-issues-created nor --gitlab-issues-closed don't trigger the error. Only --gitlab-issues-commented does.

I don't think I'm using any weird configs. For the date range I'm using just a --since argument.

from did.

Kuba314 avatar Kuba314 commented on September 23, 2024

I've decided to look into this myself. The issue is caused by the Events API saying that I commented on an issue, but that issue is a task, which isn't returned by the Issues API, which causes get_project_issue() to fail with StopIteration, because an issue with that ID isn't returned by get_project_issues().

The reason this happens only with --gitlab-issues-commented and not --gitlab-issues-created or --gitlab-issues-closed is that the latter 2 are checking for target_type=Note, but tasks have target_type=WorkItem, so they don't show up at all.

As per gitlab-org/gitlab#368055, tasks can't be accessed via the REST API yet, so there isn't a way to fix this properly, but at least did shouldn't raise an Exception.

There are 2 ways to fix this:

  1. Ignore comments on issues that Gitlab API doesn't return (most likely tasks).
  2. Ignore when issue can't be fetched in Note.iid().

The second option is better IMO, but it will require to print something else in the summary instead of the iid. Maybe reuse the "unknown" string? Or use #(task {id}, id being the global ID?

* Issues commented on gitlab: 2
    * namespace/project#001 - Issue title
    * namespace/project#unknown - Task title

from did.

Kuba314 avatar Kuba314 commented on September 23, 2024

Created a PR for the change I proposed.

from did.

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.