jxmot / github-label-manager

WIP: A web-browser utility to manage GitHub labels
MIT License
0 stars 1 forks source link
css github github-api html javascript jquery labeling-tool labels php utility

github-label-manager [WORK IN PROGRESS!]

NOTE: This project is currently a "work-in-progress". And will be in various states between "working" and "not working". The master branch will not necessarily be the most current.

2020-08-27 : Revisited project, fixed some minor bugs. Had to update the git token(not visible in repo).

2018-04-20 : Added a verticle scroll and max height to the label table. And I've working on some custom fonts(icons) for indicating the origin of the label (GitHub vs imported) and for indicating the origin-related states.

2018-04-17 : Added emoji rendering to labels, but the code needs some refactoring due to duplication. Also need to investigate some of the error handling so that the messages and/or actions are appropraite ("Read Labels" w/o a selected repo)

2018-04-10 : Label file export/import and row marking (as imported) is working, needs additional testing and integration of imported labels into other operations.

2018-03-31 : Basic label retrieval from a repo, label edit, undo, and mark for deletion are working.

Major To Do's : label deletion from repo, label upload to repo, new label creation

A web based utility to manage GitHub labels.

History

GitHub is a great tool, and I appreciate all the work that has gone into it. But lately I've been using issues on my repositories to note bugs, enhancements, etc. And I like the fact that I can use labels. However, it would have been really nice to make the labels global in respect to the repositories. For example there is a group of 4 or 5 labels that I would like to use everywhere. And getting them to each of the desired repositories is no effortless task! So, this is what I came up with....

Goals

In addition to having a convenient tool the following goals are planned:

Overview

This utility will provide -

This application is not intended to be deployed for multi-user scenarios. It is intended to assist an individual in the task of managing GitHub issue labels across a number of repositories. Each user(repository owner/collaborator) will require their own separate installation of this application. This application can be hosted either locally or on an Internet accessible web server. However the latter is not recommended unless sufficient security has been implemented.

Label data files can be shared between users. Those files do not contain any GitHub user or repository information. However in situations where label data files are automatically saved the file names will contain a repository name.

All data files are kept on the server where the application is ran from. They will be found in the ./data folder.

Running the Application

Do not host this application on an internet accessible web server. Since it can make changes to a repository labels without "logging in" it should be ran from a protected environment.

A local web server like XAMPP or MAMP is required. Run this application in a browser and direct it to where the application is hosted.

Another requirement is that you obtain a GitHub personal access token. This can be done by visiting your profile and accessing Developer Settings. From there choose Personal Access Tokens and generate a new token.

Follow these steps:

1) Obtain and install a local web server application. You must have PHP installed! 2) Rename www/data/config/example_gitlabels.json TO www/data/config/_gitlabels.json 3) Edit _gitlabels.json :

{
    "owner": "repo_owner",
    "token": "token ????????????????????????????????????"
}

Replace: "repo_owner" with your GitHub user name. ???????????????????????????????????? with your personal access token

4) Save the file. 5) Copy the contents including all sub-folders of the www folder in to the location where your web server expects to find its files. It is possible to contain the application within its own sub-folder. 6) Run the application in your browser - http://localhost/ or http://localhost/test if for example, you placed the application in a sub-folder named test.

Work Flow

Choosing s Repository

Loading Labels

Editing s Label

Deleting a Label

Creating a Label

Undo Changes

Uploading Changes

Export Labels

Import Labels

Initial GUI Design

A wireframe is your friend.... and time is well spent making one. And Mock ups are a good alternative.

This was my initial pass at putting together a GUI for this application -

Sort-of Wireframe

Then after some thought and making adjustments I ended up with this -

Sort-of Wireframe

Changes included -

Defining the Operation

Now that I had my mock-up I could begin finalizing how the application was going to operate. It was also an opportunity at this point to make additional adjustments to the GUI.

But before I started on operations I had to come up with some rules. These rules help define some of the operations and their associated indicators. Here are some examples -

Application States

JSON Data

Configuration _gitlabels.json

Repository Information

Label List

Task List & Development Status

[x] - complete
[i] - in progress
[b] - blocked
[n] - no further work is needed

Other things to do along the way -