Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Sjj1024 committed Dec 26, 2024
1 parent 9403c7d commit 8f80b26
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
10 changes: 2 additions & 8 deletions src-tauri/src/command/pakeplus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,7 @@ pub async fn update_config_file(
if ascii {
contents = contents.replace("-3", r#""all""#);
} else {
contents = contents.replace(
"-3",
r#"["deb", "appimage", "nsis", "app", "dmg", "updater"]"#,
);
contents = contents.replace("-3", r#"["deb", "appimage", "nsis", "app", "dmg"]"#);
}
// println!("Updated config file: {}", contents);
// The new file content, using Base64 encoding
Expand Down Expand Up @@ -182,10 +179,7 @@ pub async fn update_config_json(
if ascii {
contents = contents.replace("-3", r#""all""#);
} else {
contents = contents.replace(
"-3",
r#"["deb", "appimage", "nsis", "app", "dmg", "updater"]"#,
);
contents = contents.replace("-3", r#"["deb", "appimage", "nsis", "app", "dmg"]"#);
}
// println!("Updated config file: {}", contents);
// The new file content, using Base64 encoding
Expand Down
14 changes: 9 additions & 5 deletions src/pages/edit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1280,11 +1280,13 @@ const dispatchAction = async () => {
}
// create issue
const createIssue = async (url: string) => {
const createIssue = async (url: string, label: string, title: string) => {
const issueRes: any = await githubApi.createIssue({
body: `build error:${url}`,
labels: ['failure'],
title: `${store.currentProject.name} build error`,
body: `name: ${store.currentProject.name}\n
weburl: ${store.currentProject.url}\n
build error: ${url}`,
labels: [label],
title: title,
})
console.log('issueRes---', issueRes)
}
Expand All @@ -1297,7 +1299,7 @@ const reRunFailsJobs = async (id: number, html_url: string) => {
console.log('rerun cancel', rerunCount)
buildLoading.value = false
buildTime = 0
createIssue(html_url)
createIssue(html_url, 'failure', 'build error')
openUrl(html_url)
document.querySelector('.el-loading-text')!.innerHTML = t('failure')
buildSecondTimer && clearInterval(buildSecondTimer)
Expand Down Expand Up @@ -1332,6 +1334,7 @@ const checkBuildStatus = async () => {
buildStatus = t(status) || t('inProgress')
if (checkRes.status === 200 && checkRes.data.total_count > 0) {
if (status === 'completed' && conclusion === 'success') {
createIssue(html_url, 'success', 'build success')
document.querySelector('.el-loading-text')!.innerHTML =
t('buildSuccess')
// clear timer
Expand All @@ -1341,6 +1344,7 @@ const checkBuildStatus = async () => {
buildTime = 0
router.push('/history')
} else if (status === 'completed' && conclusion === 'cancelled') {
createIssue(html_url, 'cancelled', 'build cancelled')
document.querySelector('.el-loading-text')!.innerHTML =
t('cancelled')
buildLoading.value = false
Expand Down

0 comments on commit 8f80b26

Please sign in to comment.