How do I migrate an Assembla project (Issues and Source) to Github? - github

I wanna migrate a project from Assembla to Github with all its tickets and sources.
Sources
The sources are not the problem because I can push it easily to the new environment.
Tickets
My problem is the linking between commits that includes an issue number (e.g. #123 Increased build number) to the related issue / ticket.
Github counts everything in its ID (tickets, pull requests, etc). That means that it seems to be highly unlikely that my Assembla ticket #123 will be my Github issue #123 and therefore the connection between he commit and the ticket will break.
I tried to export all my tickets from Assembla but label Backup successfully scheduled. stays for hours now.
Question
Please correct me if this assumption is false. My question at all is, if someone could provide an idea how to solve the problem. It seems to be that there is no official importer to Github or exporter from Assembla.

You are right, official importer from assembla to github does not exists. So you need to do it manually(implement utility) consuming assembla api to pull information and upload it to github. You can try to find existing hand made tools here

Please correct me if this assumption is false. My question at all is,
if someone could provide an idea how to solve the problem. It seems to
be that there is no official importer to Github or exporter from
Assembla.
I couldn't find an answer or a solution that included migrating both source code and issues (tickets). Here is an article I wrote with a complete solution.
Github counts everything in its ID (tickets, pull requests, etc). That
means that it seems to be highly unlikely that my Assembla ticket #123
will be my Github issue #123 and therefore the connection between he
commit and the ticket will break.
I found a solution for that as well. There was a need to create an automatic script (in Python) for associating Assembla Tickets' attached files with these files after being added to the Github's Issues, and that includes:
- Handling updates in Tickets
- Handling labels
- Handling references between Tickets
- Handling references to Commits.
- Preserving the original Tickets numbering after migrating them as Issues to Github.
The process includes:
Creating a backup of all Tickets (which unfortunately doesn't contain any images or attached files). Following your question, you need to go to Settings and schedule a backup for your tickets, and then visit again this page and download it. The backup should be a .bak file.
Importing the Assembla repository from Github's new repository.
Customizing the scripts, as explained in this article.
Running our script which handles all the rest via automation.
Optionally:
Updating existing Issues in a Github Repo

Related

How can I create a complete offline archive of a GitHub repository?

We have some repos that we no longer need to keep on GitHub. If we use GitHub's archiving feature, the repos actually stay online. What we'd like instead is a way to download an archive of all the content (including issue reports) for a given repository, put that repository archive in a long-term preservation system, and delete the repo from GitHub. This is more than simply backing up a repository in the sense of other similar questions on Stack Overflow, and is more like what BackHub can do. Is there a tool or set of procedures (beyond git clone) that will allow me to do this?
python-github-backup can back up a single repository in an organizational account, as well as all repositories in an account. I have tried it on individual repositories, and it worked as hoped: using its --all option, it captures issues, labels, milestones, pull requests, and wiki pages, as well as the repo itself.
Googling "github-backup" leads to other similar tools, but most of the others seem to have fewer features than python-github-backup or haven't been updated for many years. However, I must admit I haven't explored the other options very carefully.
Tip: the essential ingredient in using Google to find a suitable tool seems to be to search for the words "github" and "backup" specifically, and not include "archive" as I was doing in my original search, or even use more elaborate search strings such as "how make backup github repository".
If is preferable to use git clone --mirror, to get the full repo history and then
git bundle --all to get only one file (easier to store than a collection of files)
a long term storage system (example AWS S3)
Notes:
you might want to clone the associated GitHub wiki as well, if you have one.
that won't preserve your issues/Pull Requests
Use a folder on your local machine, google drive, or dropbox. No need to use github on non-active projects.

Using GitHub for issue tracking for a local Git repository

My company has a Git repository hosted on our servers. We use TortoiseGit. I would like to integrate it with GitHub Issues.
Is this possible? Note that we do not host our repository on GitHub.
I have tried using the bugtraq settings on TortoiseGit but it doesn't interact with the repository I've set up on GitHub.
I would like to integrate it with GitHub Issues. Is this possible?
Integrate in this context is a very open concept. Which integrations are you looking for? If you're not hosting the code on the repository itself, any kind of integration will be hard, but it really depends on your specific goal with GitHub Issues and which kind of triggers and links you want from your code to your issues.
From experience if I assume that by integration you mean linking Git commits in your local repository to GitHub Issues the clear answer is no.
So if you really want to use GitHub Issues without pushing the Git code upstream, have you considered creating an empty project to just use GitHub Issues and GitHub Projects. You won't be able to reference issues from the commit message, i.e., Fixed issue found in #4 but you can use it as a standalone project management tool.
Trello offers a free tier for project management that you might also want to check out.

Multibranch pipeline job not showing open pull requests

I have configured a multibranch pipeline job in Jenkins linked to our GitHub repo which is working nicely, feeding back the status of checks to the pull request in our GitHub so we know if the branch is good for merging in.
What I don't see are any open pull requests listed against the Job in Jenkins:
We also have the Blue Ocean plugin in installed and no PR's are shown there either.
Anyone know why this is the case? Am I missing another plugin\config?
I had this issue as well. I tried what joey suggested, but that did not work. I found out that if you add PR-.+ (or PR-* as a wildcard) to your regex filter for branches to include, the pull requests "magically" appear. The documentation of this was found here. It's very frustrating that the "official" documentation for this plugin does not explain this (at least from what sparse documentation I could find). The configuration for my project, which works, is here:
I'm not sure if this is a recommended way to use this plugin for this use case, but Jenkins never seems to have ample documentation.
I was getting the same issue. But this time within Blue Ocean UI as shown below
The fix was to switch from using Git to GitHub Branch Source at the job level and configure GitHub Branch Source. The job type was Multibranch pipeline.
One possible cause could be that GitHub is unable to connect to Jenkins directly due to a firewall. This is likely the case if GitHub never reports the status check as completed, in other words, it hangs forever.
In this case, polling is an easy solution. Go to http://_jenkins_ip_:8080/job/_job_name_/configure and select the "Scan Repository Triggers" tab. Tick the "Periodically if not otherwise run" checkbox and select an interval. I have 15 minutes on mine.
The first time this is done, there should be an immediate scan and it should detect the pull request, otherwise, there might be something else going on. Check the "Scan Repository Log" page on the job, as it might have useful info.
By the way, I did not install the "GitHub Pull Request Builder Plugin" as the page says that it has a security issue. Instead, the "GitHub Branch Source Plugin" is being used. Some other related plugins installed:
Git client plugin
Git plugin
GitHub API Plugin
GitHub Authentication plugin
GitHub Integration Plugin
GitHub plugin
I'm also using Blue Ocean, but this is not required, it simply provides a different UI.
I know that this is an old topic, but I had the same issue while I was trying to visualize my Pull Requests from Bitbucket and I hope this answer will help other people in need. In my case, I was using Bitbucket Push and Pull Request Plugin, which is pretty similar to other GitHub Plugins for Jenkins.
My problem came from the fact that I selected Git instead of Bitbucket in Branch Sources >> Add Source section. I suspect the same thing happened in this case, where the two options Git and GitHub are even easier to confuse.

How to get github issues(tickets) from terminal?

There is a way to get all the issues from a git repository? I need to populate a mysql database with the issues of a specific project with the issues status, reporter, priority, etc... Thanks!
Git and GitHub are two different things. The former is a version control system which does not know anything about “issues” or “tickets”, while the latter is a project platform with source hosting and issue management. So the GitHub issues are very specific to GitHub. No Git command will be able to give you GitHub issues.
There is hub (repository), a wrapper around Git, which adds a few GitHub specific functionalities, like interacting with pull requests from the command line. For all browsing-related tasks it refers to the web browser though. And that’s also GitHub’s primary interface.
There does exist an API for issues though, so you could utilize that. There is ghi which utilizes the API and does offer you access to GitHub issues from the command line.
Try ghi, here's what it does:
By default, ghi looks for GitHub issues by resolving the current
working directory's repository: first it looks for an upstream remote,
then it looks at origin.
Gives you a nice list of issues, a detail view, close/edit/assign features etc. I'm never leaving the terminal again.
Github provides a web api for their ticket system. It is documented here and you can write a small program to fetch them and look through them.

Recover a deleted repository github issues

My repository in the github had been deleted.
The code was recovered, but we had a lot of Github issues i'd like to recover, is there a way to recover them once deleted?
Thanks.
You need to email support#github.com as soon as possible when this happens.
I accidentally deleted our main GitHub repository instead of my own fork. I emailed support#github.com like Paul Betts suggested.
After about 10 minutes the support replied and the original repository was recovered.
I accidentally deleted my important repository and when tried the above-suggested methods, got to know that the process has been updated.
Please follow the steps provided in the link to recover the repository all by yourself.
Link - https://docs.github.com/en/github/administering-a-repository/restoring-a-deleted-repository
Note - You can only restore repositories that have no forks or have not been forked. (As per mentioned under Settings >> Repositories >> Deleted Repositories section)
Also, for any Github-related support requests, one needs to raise the support request through Github's support website.
Link - https://support.github.com/ (works for any GitHub related support)