-
Notifications
You must be signed in to change notification settings - Fork 24
/
yoda-label-manager.html
125 lines (104 loc) · 4.88 KB
/
yoda-label-manager.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="description" content="Yoda. GitHub lightweight extention for Agile Project Management using GitHub issues. Label Manager.">
<!--
Copyright 2018-2023 Hewlett Packard Enterprise Development LP
Copyright 2024- Jens Vedel Markussen
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
and associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or
substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-->
<title>GitHub Label Manager</title>
<link rel="icon" href="label-manager-icon-32.png" type="image/png" />
<script type='text/javascript' src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="yoda.css">
<style>
label, input {
float: left;
margin: 5px 5px 2px 2px;
}
</style>
</head>
<body>
<div class="frame">
<div class="dropdown">
<img id="hamburger" src="threebars.png" class="dropimg">
<div id="yodamenu" class="dropdown-content"></div>
</div>
<div class="field" style="display: none;">
<label>GitHub user</label> <input type="text" size="15" id="user" value="">
<span class="tooltip">Your GitHub user-id</span>
</div>
<div class="field" style="display: none;">
<label>GitHub token</label> <input type="password" size="30" id="token" value="">
<span class="tooltip">GitHub personal token</span>
</div>
</div>
<div class="thetwoframes">
<div class="labelframe">
<div class="frame">
<h3 style="color: white; margin: 4px 20px">Source</h3>
<div class="flatfield">
<label>Owner</label> <input type="text" id="srcowner" size="15" value="" onchange="updateSrcRepos()">
<span class="tooltip">Source GitHub organization or user</span>
</div>
<div class="flatfield">
<label>Repo</label> <input list="srcrepolist" type="text" id="srcrepo" size="15" value="" onchange="getSrcLabels()">
<span class="tooltip">Source repository</span>
</div>
<datalist id="srcrepolist">
</datalist>
<div class="flatfield">
<label># Labels</label> <input type="text" id="srclabelsnumber" size="8" readonly>
</div>
</div>
<button id="copyall" class="gitbutton" style="background: grey;" onclick="copyAllLabels()">Copy all labels</button>
<button id="githubbutton" class="gitbutton" onclick="openSrcRepo()">Goto github</button>
<button id="refreshbutton" class="gitbutton" onclick="getSrcLabels();">Refresh Labels</button>
<p class="gitnote">Click to copy/update update to destination (left to right).</p>
<div class="gitlabelblock" id="srclabels"></div>
</div>
<div class="labelframe">
<div class="frame">
<h3 style="color: white; margin: 4px 20px">Destination</h3>
<div class="flatfield">
<label>Owner</label> <input type="text" id="dstowner" size="15" value="hpsd" onchange="updateDstRepos()">
<span class="tooltip">Destination GitHub organization or user</span>
</div>
<div class="flatfield">
<label>Repo</label> <input list="dstrepolist" type="text" id="dstrepo" size="15" value="" onchange="getDstLabels()">
<span class="tooltip">Destination repository</span>
</div>
<datalist id="dstrepolist">
</datalist>
<div class="flatfield">
<label># Labels</label> <input type="text" id="dstlabelsnumber" size="8" readonly>
</div>
</div>
<button id="deleteall" class="gitbutton" style="background: grey;" onclick="deleteAllLabels()">Delete all labels</button>
<button id="githubbutton" class="gitbutton" onclick="openDstRepo()">Goto github</button>
<button id="refreshbutton" class="gitbutton" onclick="getDstLabels()">Refresh Labels</button>
<p class="gitnote">Click label to delete it (only if no issues using them). Delete all button to do same for all</p>
<div class="gitlabelblock" id="dstlabels"></div>
</div>
<div id="snackbar">Some text some message..</div>
</div>
<script type="module">
import * as functions from './yoda-label-manager.js';
Object.keys(functions).forEach((f) => { window[f] = functions[f]; }); // small hack
functions.init();
</script>
</body>
</html>