mirror of
https://github.com/go-gitea/gitea.git
synced 2025-11-10 15:32:55 +09:00
Compare commits
2 Commits
v1.20.6
...
release/v1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
782414ba8f | ||
|
|
59d88c47b8 |
2
.github/workflows/release-tag-version.yml
vendored
2
.github/workflows/release-tag-version.yml
vendored
@@ -46,7 +46,7 @@ jobs:
|
|||||||
- name: Get cleaned branch name
|
- name: Get cleaned branch name
|
||||||
id: clean_name
|
id: clean_name
|
||||||
run: |
|
run: |
|
||||||
REF_NAME=$(echo "${{ github.ref }}" | sed -e 's/refs\/heads\///' -e 's/refs\/tags\///' -e 's/release\/v//')
|
REF_NAME=$(echo "${{ github.ref }}" | sed -e 's/refs\/heads\///' -e 's/refs\/tags\/v//' -e 's/release\/v//')
|
||||||
echo "Cleaned name is ${REF_NAME}"
|
echo "Cleaned name is ${REF_NAME}"
|
||||||
echo "branch=${REF_NAME}" >> "$GITHUB_OUTPUT"
|
echo "branch=${REF_NAME}" >> "$GITHUB_OUTPUT"
|
||||||
- name: configure aws
|
- name: configure aws
|
||||||
|
|||||||
@@ -189,16 +189,30 @@ func SoftDeleteContentHistory(ctx *context.Context) {
|
|||||||
var comment *issues_model.Comment
|
var comment *issues_model.Comment
|
||||||
var history *issues_model.ContentHistory
|
var history *issues_model.ContentHistory
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
|
if history, err = issues_model.GetIssueContentHistoryByID(ctx, historyID); err != nil {
|
||||||
|
log.Error("can not get issue content history %v. err=%v", historyID, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if history.IssueID != issue.ID {
|
||||||
|
ctx.NotFound("CompareRepoID", issues_model.ErrCommentNotExist{})
|
||||||
|
return
|
||||||
|
}
|
||||||
if commentID != 0 {
|
if commentID != 0 {
|
||||||
|
if history.CommentID != commentID {
|
||||||
|
ctx.NotFound("CompareCommentID", issues_model.ErrCommentNotExist{})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if comment, err = issues_model.GetCommentByID(ctx, commentID); err != nil {
|
if comment, err = issues_model.GetCommentByID(ctx, commentID); err != nil {
|
||||||
log.Error("can not get comment for issue content history %v. err=%v", historyID, err)
|
log.Error("can not get comment for issue content history %v. err=%v", historyID, err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
if comment.IssueID != issue.ID {
|
||||||
if history, err = issues_model.GetIssueContentHistoryByID(ctx, historyID); err != nil {
|
ctx.NotFound("CompareIssueID", issues_model.ErrCommentNotExist{})
|
||||||
log.Error("can not get issue content history %v. err=%v", historyID, err)
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
canSoftDelete := canSoftDeleteContentHistory(ctx, issue, comment, history)
|
canSoftDelete := canSoftDeleteContentHistory(ctx, issue, comment, history)
|
||||||
if !canSoftDelete {
|
if !canSoftDelete {
|
||||||
|
|||||||
@@ -90,6 +90,12 @@ func IssuePinMove(ctx *context.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if issue.RepoID != ctx.Repo.Repository.ID {
|
||||||
|
ctx.Status(http.StatusNotFound)
|
||||||
|
log.Error("Issue does not belong to this repository")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
err = issue.MovePin(ctx, form.Position)
|
err = issue.MovePin(ctx, form.Position)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ctx.Status(http.StatusInternalServerError)
|
ctx.Status(http.StatusInternalServerError)
|
||||||
|
|||||||
Reference in New Issue
Block a user