Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etersoft-build-utils
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Roman Alifanov
etersoft-build-utils
Commits
3572e8a2
Commit
3572e8a2
authored
Feb 08, 2026
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gita approve: make subtask optional, approve all subtasks when omitted
parent
6adc9c24
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
6 deletions
+20
-6
gitask
bin/gitask
+20
-6
No files found.
bin/gitask
View file @
3572e8a2
...
@@ -38,7 +38,7 @@ if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
...
@@ -38,7 +38,7 @@ if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
echo
" show NNNN [-v] - show subtask list for task NNNN (-v for full metadata)"
echo
" show NNNN [-v] - show subtask list for task NNNN (-v for full metadata)"
echo
" quota - show quota on the remote servers"
echo
" quota - show quota on the remote servers"
echo
" cancel NNNN - cancel task NNNN"
echo
" cancel NNNN - cancel task NNNN"
echo
" approve NNNN
SUBTASK [-m <message>] - approve subtask
"
echo
" approve NNNN
[SUBTASK] [-m <message>] - approve subtask (all subtasks if SUBTASK is omitted)
"
echo
" acl [branch] package - show acl for the package"
echo
" acl [branch] package - show acl for the package"
echo
" acl [branch] package add|del <user> - add/del acl for the package"
echo
" acl [branch] package add|del <user> - add/del acl for the package"
echo
" wait [NNNN] [-q|--quiet] - wait for task build to complete"
echo
" wait [NNNN] [-q|--quiet] - wait for task build to complete"
...
@@ -80,6 +80,12 @@ get_subtask()
...
@@ -80,6 +80,12 @@ get_subtask()
ssh
$GEARHOST
task show
$1
|
grep
-E
"(/
$2
.git|:package=
$2$|
:srpm=
$2
-.*src.rpm)"
|
sed
-e
"s|^
\(
[0-9]*
\)
:.*|
\1
|g"
ssh
$GEARHOST
task show
$1
|
grep
-E
"(/
$2
.git|:package=
$2$|
:srpm=
$2
-.*src.rpm)"
|
sed
-e
"s|^
\(
[0-9]*
\)
:.*|
\1
|g"
}
}
# get all subtask numbers from TASKNUMBER
get_all_subtasks
()
{
ssh
$GEARHOST
task show
$1
|
sed
-n
's|^ \([0-9]*\):dir=.*|\1|p'
}
_list_git_package
()
_list_git_package
()
{
{
while
read
path
date
other
;
do
while
read
path
date
other
;
do
...
@@ -496,14 +502,22 @@ if [ "$1" = "approve" ] ; then
...
@@ -496,14 +502,22 @@ if [ "$1" = "approve" ] ; then
done
done
[
-n
"
$TASK
"
]
||
TASK
=
"
$(
get_last
)
"
||
fatal
"Can't get last task"
[
-n
"
$TASK
"
]
||
TASK
=
"
$(
get_last
)
"
||
fatal
"Can't get last task"
[
-n
"
$SUBTASK
"
]
||
fatal
"Subtask number required"
showcmd ssh
$GEARHOST
task approve
"
$TASK
"
"
$SUBTASK
"
if
[
-n
"
$SUBTASK
"
]
;
then
if
[
-n
"
$MESSAGETEXT
"
]
;
then
SUBTASKLIST
=
"
$SUBTASK
"
echo
"
$MESSAGETEXT
"
| ssh
$GEARHOST
task approve
"
$TASK
"
"
$SUBTASK
"
else
else
ssh
$GEARHOST
task approve
"
$TASK
"
"
$SUBTASK
"
SUBTASKLIST
=
"
$(
get_all_subtasks
"
$TASK
"
)
"
[
-n
"
$SUBTASKLIST
"
]
||
fatal
"No subtasks found in task
$TASK
"
fi
fi
for
ST
in
$SUBTASKLIST
;
do
showcmd ssh
$GEARHOST
task approve
"
$TASK
"
"
$ST
"
if
[
-n
"
$MESSAGETEXT
"
]
;
then
echo
"
$MESSAGETEXT
"
| ssh
$GEARHOST
task approve
"
$TASK
"
"
$ST
"
else
ssh
$GEARHOST
task approve
"
$TASK
"
"
$ST
"
fi
done
exit
exit
fi
fi
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment