diff --git a/spug_api/libs/gitlib.py b/spug_api/libs/gitlib.py
index 9fcf309..096d8a3 100644
--- a/spug_api/libs/gitlib.py
+++ b/spug_api/libs/gitlib.py
@@ -27,8 +27,14 @@ class Git:
'author': ref.tag.tagger.name,
'date': ref.tag.tagged_date,
'message': ref.tag.message.strip()
- } if ref.tag else {}
- return branches, tags
+ } if ref.tag else {
+ 'id': ref.commit.binsha.hex(),
+ 'author': ref.commit.author.name,
+ 'date': ref.commit.authored_date,
+ 'message': ref.commit.message.strip()
+ }
+ tags = sorted(tags.items(), key=lambda x: x[1]['date'], reverse=True)
+ return branches, dict(tags)
def _get_repo(self, git_repo, repo_dir):
if os.path.exists(repo_dir):
diff --git a/spug_web/src/pages/deploy/request/Ext1Form.js b/spug_web/src/pages/deploy/request/Ext1Form.js
index 42c7d8c..2d79876 100644
--- a/spug_web/src/pages/deploy/request/Ext1Form.js
+++ b/spug_web/src/pages/deploy/request/Ext1Form.js
@@ -79,7 +79,7 @@ class Ext1Form extends React.Component {
};
switchType = (v) => {
- this.setState({git_type: v, extra1: null}, this._initExtra1)
+ this.setState({git_type: v, extra1: undefined}, this._initExtra1)
};
switchExtra1 = (v) => {
@@ -157,7 +157,7 @@ class Ext1Form extends React.Component {
Object.keys(branches || {}).map(b => {b})
) : (
Object.entries(tags || {}).map(([tag, info]) => (
- {tag} {info.author}
+ {tag} {info.author} {info.message}
))
)}