Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CLOSED] added support for github enterprise AND closed issues. #11

Open
voiskiTest opened this issue Nov 10, 2017 · 6 comments
Open

[CLOSED] added support for github enterprise AND closed issues. #11

voiskiTest opened this issue Nov 10, 2017 · 6 comments

Comments

@voiskiTest
Copy link
Owner

Issue by joshuairl
Wednesday Oct 09, 2013 at 18:08 GMT
Originally opened as IQAndreas/github-issues-import#11


Feel free to merge this or not... but I find it useful for my given circumstances.
Others may find my version useful if they also desire this functionality.
Allows you to freely migrate repos to and from github enterprise and github.com.
Allows you to import closed issues too.


I have made extensive changes to how this works which allows for the
migration of issues to and from github enterprise and github.com, etc.

to do so, I had to add more explicit config options for source and
target.

example:

# Rename to `config.ini`, and keep it in the same folder as
`gh-issues-import.py`
# All optional fields have been commented out.

[source]
server = github.com
repository = example/sample_repo
username = [email protected]
password = naked_password

[target]
server = github.example.org
repository = example/sample_repo
username = user1
password = naked_password

[format] # These can be adjusted based on your group's region and
language.

# Unless an absolute path is given, the templates are relative to the
current working directory.
# Example (and default) templates can be found in the `templates`
folder.
#issue_template =        templates/issue.md
#pull_request_template = templates/pull_request.md
#comment_template =      templates/comment.md

# If unsure, just using '%c' will default to the locale’s appropriate
date and time representation.
#date = %A %b %d, %Y at %H:%M GMT # Sample: Friday Sep 13, 2013 at
22:58 GMT

joshuairl included the following code: https://github.com/IQAndreas/github-issues-import/pull/11/commits

@voiskiTest
Copy link
Owner Author

Comment by IQAndreas
Thursday Oct 10, 2013 at 08:34 GMT


Nice work!

I will definitely be merging this, but I would like to make a few changes before doing so.

As for the "import closed issues" feature, I have actually been trying to implement that one myself, but there is one problem with it; right now you are appending the array of closed issues to the open array, but this means the issues are imported in a different order than they were published.

I would prefer sorting them by date, but any sorting will need to be done on the client side (which seems inefficient, but I can't find any better alternative). But I'll fix this and add these features over the weekend.

Thanks for your contribution! :)

@voiskiTest
Copy link
Owner Author

Comment by IQAndreas
Sunday Oct 13, 2013 at 04:00 GMT


I implemented your support for enterprise servers, but with a few of my own slight changes. Primarily, usernames and passwords for specific organizations cannot be passed as arguments, but they can be defined in the config, and you will be prompted for them separately if they are not defined there.

Also, allowing for a different username for the source and target repositories turned out to be a great idea, even when not using an enterprise organization!

I tested the changes here on GitHub, but I do not have access to an enterprise organization to see if the "cross-server-issue-transporting" works. If you have the time and means, I would be immensely grateful if you could test out the new version on an enterprise server, @joshuairl :

@voiskiTest
Copy link
Owner Author

Comment by joshuairl
Sunday Oct 13, 2013 at 04:36 GMT


Great to hear, I will give it a run through with enterprise.

I've never written anything in python... Hope it wasn't too messy!!

Joshua F. Rountree
513-558-3333 (m-f 8a-5p)
513-827-7936 (mobile)
[email protected]

Sent from my iPhone

On Oct 13, 2013, at 12:00 AM, Andreas Renberg [email protected] wrote:

I implemented your support for enterprise servers, but with a few of my own slight changes. Primarily, usernames and passwords for specific organizations cannot be passed as arguments, but they can be defined in the config, and you will be prompted for them separately if they are not defined there.

Also, allowing for a different username for the source and target repositories turned out to be a great idea, even if you aren't using an enterprise organization!

I tested the changes here on GitHub, but I do not have access to an enterprise organization to see if the "cross-server-issue-transporting" works. If you have the time and means, I would be immensely grateful if you could test out the new version on an enterprise server, @joshuairl :

https://github.com/IQAndreas/github-issues-import/tree/gh-enterprise

Reply to this email directly or view it on GitHub.

@voiskiTest
Copy link
Owner Author

Comment by tskulbru
Friday Oct 25, 2013 at 11:05 GMT


How is the "import closed issues as well" feature coming along? It would really help me out at the moment :)

@voiskiTest
Copy link
Owner Author

Comment by IQAndreas
Saturday Oct 26, 2013 at 06:34 GMT


How is the "import closed issues as well" feature coming along? It would really help me out at the moment :)

It's in the pipeline, and I can probably have it done by before Monday if you need it.

The code I can do, but the problem is I'm not sure how closed issues should appear to the user in the target repository. Do you think you could help me by explaining your current project's setup? It will better help me if I know the use-case for closed issues.

I set up a new issue where this could be discussed, do you think you could add your thoughts there? IQAndreas/github-issues-import#12

@voiskiTest
Copy link
Owner Author

Comment by IQAndreas
Tuesday Oct 29, 2013 at 08:36 GMT


Added with the following two commits:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant