Skip to content

Commit

Permalink
update lint
Browse files Browse the repository at this point in the history
  • Loading branch information
fuxiaohei committed Sep 22, 2023
1 parent fa96647 commit 5646de0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
1 change: 1 addition & 0 deletions options/locale/locale_en-US.ini
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ pin = Pin
unpin = Unpin

artifacts = Artifacts
artifact_delete_confirm = Are you sure?

archived = Archived

Expand Down
5 changes: 1 addition & 4 deletions services/actions/cleanup.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@ func CleanupArtifacts(taskCtx context.Context) error {
if err := cleanExpiredArtifacts(taskCtx); err != nil {
return err
}
if err := cleanNeedDeleteArtifacts(taskCtx); err != nil {
return err
}
return nil
return cleanNeedDeleteArtifacts(taskCtx)
}

func cleanExpiredArtifacts(taskCtx context.Context) error {
Expand Down
1 change: 1 addition & 0 deletions templates/repo/actions/view.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
data-locale-status-skipped="{{.locale.Tr "actions.status.skipped"}}"
data-locale-status-blocked="{{.locale.Tr "actions.status.blocked"}}"
data-locale-artifacts-title="{{$.locale.Tr "artifacts"}}"
data-locale-artifact-delete-confirm="{{$.locale.Tr "artifact_delete_confirm"}}"
data-locale-show-timestamps="{{.locale.Tr "show_timestamps"}}"
data-locale-show-log-seconds="{{.locale.Tr "show_log_seconds"}}"
data-locale-show-full-screen="{{.locale.Tr "show_full_screen"}}"
Expand Down
6 changes: 3 additions & 3 deletions web_src/js/components/RepoActionView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {createApp} from 'vue';
import {toggleElem} from '../utils/dom.js';
import {getCurrentLocale} from '../utils.js';
import {renderAnsi} from '../render/ansi.js';
import {POST,DELETE} from '../modules/fetch.js';
import {POST, DELETE} from '../modules/fetch.js';
const sfc = {
name: 'RepoActionView',
Expand Down Expand Up @@ -201,10 +201,10 @@ const sfc = {
},
deleteArtifact(name) {
if (!confirm(this.locale.artifactDeleteConfirm)) {
if (!window.confirm(this.locale.artifactDeleteConfirm)) {
return;
}
let link = this.run.link + '/artifacts/' + name
const link = `${this.run.link}/artifacts/${name}`;
DELETE(link).then(this.loadJob);
},
Expand Down

0 comments on commit 5646de0

Please sign in to comment.