How to delete GitHub issues lables? - github

I create a repository on GitHub. And I wan't create a issue label Linux, but I input wrong as linux, Now, I wan't change it or delete it, what should I do?
Note: I need to delete a label from all issue not only a single issue issue.

I would suggest to do it via the REST API of GitHub. How to work with lables and issues is documented in the section Lables of the REST API documentation.
You can create the new label manually or also via REST, add the new label to all affected issues and delete the old label. Doing it via the REST API might be the best way if a lot of issues must be changed.
You can also consider to script it via Ruby or JavaScript if you don't want to deal directly via the commandline with the API.
At the first glance it looks like a lot of effort, but it is worth it as you will discover a new and very helpful way to manage your repositories.

Related

Github how to make config for 2 developers ? issue in body

I'm new in git-hub, have an issue. Me and my friend trying to work on a small project via server terminal, but problem is when he changes branch its auto-changing for me also. We also can see each other live "coding". What we want is simple create our own branches and code there. I'm missing something easy but can't figure out.

Is it possible to use the Github CLI to find out when an issue in a board has moved from one column to the next?

I'm writing a script for tracking issues in a board on Github. There is a json field updatedAt, that allows me to know when an issue has been updated, but I need to know if that update was because it moved from one column to another, specifically from "InProgress" to a column called "Done".
The github CLI does not seem to expose this information, but in the Github UI you can see exactly when all events occur on an issue -- so theoretically it's possible, but maybe someone (me?) needs to write a github cli extension to make it work.

Use versions w/ github remote repositories (in this case w/ platformio)

This might be a basic github question, but I'm having trouble finding the right keywords to google because I don't know the terminology. Apologies and thanks in advance.
I've noticed with library dependencies in library.json, under "dependencies", there is often a github remote repo link with a version number after the #
For example
https://github.com/codewitch-honey-crisis/htcw_ili9341.git#1.0.0"
What is that exactly after the #? A branch? A release?
More importantly, how do I make my github repo expose these. Like, I want to make a 1.0.0 one now for htcw_ili9341.git but later I may want to make 1.0.1
Using the github website, and/or the command line, how do I go about this?
It would be really helpful if you explained as you went as well.
So you know where I'm coming from with this, I've been using github for awhile but only for the most basic things, and driving it all through VS Code for the most part, sometimes resorting to the web interface and only occasionally dropping to the command line, which I've done a handful of times to resolve merge conflicts. I'm not an expert, but not completely new to it either.
anything after # is never posted to the server. It's basically a comment in this specific instance.

Create new branch from the Issue

Is it possible to create new branch directly from Issue which is posted on Github? We have project hosted on Github with many issues, it would be easy for us just to click one button in Issue web interface and create new branch for it to start developing.
This is not possible directly from the issue interface. I can try to provide you some workarounds and maybe start a debate why one would want this feature:
Creating branches directly on the web interface
After you've noticed that you need to start working on an issue you can just go to the repository main page (keyboard shortcut gc) and create a branch with the name you want:
Chrome extensions
If this is a must for you, you can create a chrome extension that augments the UI and creates a branch directly from the Issues WebUI using the GitHub API. There's a lot of open source extensions that augment the default WebUI.
Is it the most efficient way to start a new feature?
I think this changes from developer to developer, but having worked with GitHub for 7 years using Issues I've never felt the need for this feature because unless it's a one line change that doesn't require local testing or compilation, I still want to get down to my command line and IDE. If I have to do that, I still have to at least git fetch to get the branch I just created directly through the issue interface. If that's the case I've always preferred to just look at the issue and run git checkout -b branch-name, optionally with git push if my team needs to see the branch.
Then the issue name wouldn't normally translate to a branch name, at least I wouldn't want that. So that option to create a branch from an issue would probably need to spin out a prompt to allow me to name the branch what I wanted.
This is just my personal opinion and nothing else, hope it helps :)
GitHub finally added this feature request to their roadmap.
Summary
The branch is the first thing a developer creates when the start
working on a new issue. Creating that association makes it really easy
for someone to then follow the work happening and keep everything
connected as they take their idea to code.
Intended Outcome
We want to help developers get started on work faster and signal to
their team where to find the code changes related to an issue. It
should also be really easy to then follow development to the pull
request without the user needing to do additional work to link
everything together.
How will it work?
From the issue page, a user can quickly create a branch with an
auto-generated or custom name that becomes associated with the issue.
They can then fetch the branch and switch to it in their development
environment and further development changes (such as commits and pull
requests) are automatically associated with the issue.
https://github.com/isaacs/github/issues/1125
Nope. You can subscribe this issue.
You could accomplish this by creating a small script.
I'd start by leveraging the Issues Event webhook. This will fire a JSON payload every time an issue is opened. When the webhook fires, your script can then create a new branch using the Create a Reference API endpoint. Note: URL must be formatted as heads/branch, not just branch.
There is an app that automatically creates branches for issues. You can install it here for free: https://github.com/marketplace/actions/create-issue-branch
If you want to create the branches manually instead of automatically:
It does not enable you (directly) to click on create branch from the issue. Instead you would have to write a comment in the issue consisting of: /cib. If you do that, it automatically creates the branch from the issue.
Please note I have no affiliation with the app.
Recently I saw that Github finally added this feature to its Issues Panel.
All you have to do is navigate to an Issue on Github and scroll down to the following section:

How to export Trac to Github Issues

We use Trac for an open-source project I'm working on. I'd like to export all of our open tickets to Github's Issues. I've found a couple small scripts that might do it, but I was wondering if anyone has done this and has suggestions.
Ideally, it would convert trac's description syntax to markdown and also export metadata like milestone information, but even a simple, working export is probably okay.
https://github.com/trustmaster/trac2github looks like it might work well, covering milestones, tickets, comments, converting usernames and setting assignees.
I exported ticket details to a CSV file using a Trac query and converted them to Github issues using PyGithub. You can find the Python script and Trac query at http://pypi.python.org/pypi/tratihubis/.
The advantage of the CSV approach is that you do not need direct access to the database and it works with any database because all you need is a Trac query. Furthermore you can manually cleanup the CSV before import and e.g. remove tickets you do not want to convert to issues.
Thanks to PyGithub, all this works with Github API v3. API v2 has been deprecated, so some older scripts doing the same might not work anymore.
You can try my trac2github PHP script, which moves only tickets, trying to preserve formatting and order of comments.
I've also written a small utility trac-hub that does the job: http://mavam.github.io/trac-hub.
It uses octokit to access github's API and sequel to interface to trac's database. As a result, it's fairly easy to adapt to your trac installation.
I recently needed to do this without having direct database access for the Trac server and wrote a Python script which uses Trac's XML-RPC interface:
https://github.com/acdha/migrate-trac-issues-to-github
It makes some attempts to preserve user assignments, convert Trac markup in the ticket description and comments, migrate commit links, rewrite ticket references to the corresponding Github issue numbers, and preserve the original Trac data for searches.