Import / Export Issues #960

Open
opened 2023-03-15 22:45:59 +00:00 by petrosilius · 7 comments

It would be nice to have the ability to export and import issues as CSV files.

In Gitlab this helps us a lot to process issues externally and import again or copy issues from one project to another.

We used this feature in the past to create a repo with a copy of issues for each of our searchwing.org rescue drones where we need to finish each issue before taking the drones into mission.

<!-- NOTE: If your issue is a security concern, please send an email to contact@codeberg.org (and if related to Gitea also to security@gitea.io) instead of opening a public issue. Thank you. Welcome to the Codeberg Community Tracker. This is the right place for bug reports, feature requests and feedback. It's the central place where we track progress and discuss, so please open issues here unless you are sure it's directly related to a specific Codeberg product and only some contributors there need to join the discussion. Easy rule: If you are unsure, report it here. When reporting bugs or asking for features in the software itself, please understand that Codeberg is a fork of Gitea. Please always check upstream (→ see FAQ) if your there is already an open issue. If not, you'd really help us if you could directly get in touch with the maintainers and open an issue here if you think a wider audience should know about that (e. g. when discussing hotfixes, backports or when discussing whether some feature should become part of Gitea or a Codeberg "add-on"). If you don't have a GitHub account, please mention this and we'll gladly forward your report to the Gitea maintainers. Thank you for reporting your findings and giving feedback on Codeberg. ## Some FAQ: ### What does upstream mean? Upstream refers to Gitea, the software Codeberg is built upon. If we ask you if you can report upstream, please visit https://github.com/go-gitea/gitea/issues and check for the bug there and report elsewise. It's usually good if the person interested in a feature or bugfix opens the request to react to questions and join the discussion. We would usually just fire the report, but won't find the time to properly react to that ... **If you do not have a GitHub account**, just tell us and we'll happily forward the report for you. ### I just noticed a typo in the sign_up / sing_up route when regis... No, this is not a typo, but intentional. It was a quick fix to avoid spammers targetting our instance and it actually worked out quite well to rename the route from sign_up to sing_up (few people notice, nice to see you have sharp eyes) ... we might have to take more effective countermeasures in the future, but for now we're actually quite good with that one ... ### How can I help? If you want to help improving Codeberg as a community home for software development, we'll gladly welcome your contribution. Check out the docs about improving Codeberg https://docs.codeberg.org/improving-codeberg/ and have a look at the open issues, especially those that are looking for contribution https://codeberg.org/Codeberg/Community/issues?state=open&labels=105 - some of them don't even require much coding knowledge. We are also happy if you forward bug reports to Gitea if the original author hasn't done that yet or hasn't got a GitHub account. --> It would be nice to have the ability to export and import issues as CSV files. In Gitlab this helps us a lot to process issues externally and import again or copy issues from one project to another. We used this feature in the past to create a repo with a copy of issues for each of our searchwing.org rescue drones where we need to finish each issue before taking the drones into mission.

You can use the tea cli to print issues as csv files:

tea issues -o csv -f index,state,author,title,body -r my/repo
You can use the [`tea` cli](https://gitea.com/gitea/tea) to print issues as csv files: ``` tea issues -o csv -f index,state,author,title,body -r my/repo ```
n0toose added the
enhancement
label 2023-04-20 17:14:04 +00:00
n0toose added the
s/Forgejo
label 2023-04-20 17:34:52 +00:00

You can use the tea cli to print issues as csv files:

tea issues -o csv -f index,state,author,title,body -r my/repo

I've just tryed but getting thiss result:
2023/10/17 23:59:56 Unknown API Error: 404 Request: '/gponzo/xxx_my_repo_xxx/api/v1/version' with 'GET' method 'map[Authorization:[Basic Z3BvbnpvOjIwQzBkMzIxQjNyZyE=]]' header and 'Not found. ' body

> You can use the [`tea` cli](https://gitea.com/gitea/tea) to print issues as csv files: > > ``` > tea issues -o csv -f index,state,author,title,body -r my/repo > ``` I've just tryed but getting thiss result: `2023/10/17 23:59:56 Unknown API Error: 404 Request: '/gponzo/xxx_my_repo_xxx/api/v1/version' with 'GET' method 'map[Authorization:[Basic Z3BvbnpvOjIwQzBkMzIxQjNyZyE=]]' header and 'Not found. ' body `
Owner

The API call seems to be nonsense. The version route is at /api/v1/version and has always been IIRC. You might want to ensure rotating your sessions etc, not sure what this Basic Authorization token is about.

The API call seems to be nonsense. The version route is at /api/v1/version and has always been IIRC. You might want to ensure rotating your sessions etc, not sure what this Basic Authorization token is about.

It was my fault, but still not able to complete:
tea-0.9.2-linux-amd64 login add
? URL of Gitea instance: https://codeberg.org
? Name of new Login [codeberg.org]: gponzo
? Do you have an access token? No
? Username: gponzo
? Password: *************
? Set Optional settings: No
Error: token does not have at least one of required scope(s): [read:user]

tea-0.9.2-linux-amd64 login add was required whan issuing the command you suggested.

What am I doing wrong?

It was my fault, but still not able to complete: `tea-0.9.2-linux-amd64 login add` `? URL of Gitea instance: https://codeberg.org` `? Name of new Login [codeberg.org]: gponzo` `? Do you have an access token? No` `? Username: gponzo` `? Password: *************` `? Set Optional settings: No` `Error: token does not have at least one of required scope(s): [read:user]` `tea-0.9.2-linux-amd64 login add` was required whan issuing the command you suggested. What am I doing wrong?
Owner

Hmm I never used this tool, to be honest. You might get around this by creating an access token with read permissions as described in https://docs.codeberg.org/advanced/access-token/

But I still wonder why this does not work if you answer that you have no token …

Hmm I never used this tool, to be honest. You might get around this by creating an access token with read permissions as described in https://docs.codeberg.org/advanced/access-token/ But I still wonder why this does not work if you answer that you have no token …

Thank you :)

I've created a token with permissions (R/W) on issues, and given to tea but I receive the very same error:
Error: token does not have at least one of required scope(s): [read:user]

:(

Thank you :) I've created a token with permissions (R/W) on issues, and given to tea but I receive the very same error: `Error: token does not have at least one of required scope(s): [read:user]` :(
Owner

I think it wants read scope on the user itself. I suppose they want to check your user account details to verify your login or something.

The personal access token thing is a mess in my eyes. Maybe you can have a look if https://codeberg.org/RobWalt/codeberg-cli is an alternative. There's a vivid community around this tool, maybe they can even help you out with the other option.

I think it wants read scope on the user itself. I suppose they want to check your user account details to verify your login or something. The personal access token thing is a mess in my eyes. Maybe you can have a look if https://codeberg.org/RobWalt/codeberg-cli is an alternative. There's a vivid community around this tool, maybe they can even help you out with the other option.
Sign in to join this conversation.
No Milestone
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Codeberg/Community#960
No description provided.