This commit is contained in:
CanbiZ 2025-03-24 15:35:04 +01:00
commit 563fd4b895
3 changed files with 10 additions and 12 deletions

View File

@ -107,37 +107,38 @@ jobs:
for (const pr of filteredPRs) { for (const pr of filteredPRs) {
const prLabels = pr.labels.map(label => label.name.toLowerCase()); const prLabels = pr.labels.map(label => label.name.toLowerCase());
let prNote = `- ${pr.title} [@${pr.user.login}](https://github.com/${pr.user.login}) ([#${pr.number}](${pr.html_url}))`;
console.log("Author: " ,pr.user.login);
if (pr.user.login.includes("push-app-to-main[bot]")) { if (pr.user.login.includes("push-app-to-main[bot]")) {
const scriptName = pr.title; const scriptName = pr.title;
try { try {
const { data: relatedIssues } = await github.rest.issues.listForRepo({ const { data: relatedIssues } = await github.rest.issues.listForRepo({
owner: context.repo.owner, owner: context.repo.owner,
repo: "ProxmoxVED", repo: "ProxmoxVED",
state: "all", state: "all",
labels: ["Started Migration To ProxmoxVE"], labels: ["Started Migration To ProxmoxVE"]
per_page: 5
}); });
const matchingIssue = relatedIssues.find(issue => const matchingIssue = relatedIssues.find(issue =>
issue.title.toLowerCase().includes(scriptName.toLowerCase()) issue.title.toLowerCase().includes(scriptName.toLowerCase())
); );
if (matchingIssue) { if (matchingIssue) {
const issueAuthor = matchingIssue.user.login; const issueAuthor = matchingIssue.user.login;
const issueAuthorUrl = `https://github.com/${issueAuthor}`; const issueAuthorUrl = `https://github.com/${issueAuthor}`;
prNote = `- ${pr.title} [@${issueAuthor}](${issueAuthorUrl}) ([#${pr.number}](${pr.html_url}))`; prNote = `- ${pr.title} [@${issueAuthor}](${issueAuthorUrl}) ([#${pr.number}](${pr.html_url}))`;
} }
else {
prNote = `- ${pr.title} ([#${pr.number}](${pr.html_url}))`;
}
} catch (error) { } catch (error) {
console.error(`Error fetching related issues: ${error}`); console.error(`Error fetching related issues: ${error}`);
prNote = `- ${pr.title} ([#${pr.number}](${pr.html_url}))`; prNote = `- ${pr.title} ([#${pr.number}](${pr.html_url}))`;
} }
}else{
prNote = `- ${pr.title} [@${pr.user.login}](https://github.com/${pr.user.login}) ([#${pr.number}](${pr.html_url}))`;
} }
if (prLabels.includes("new script")) { if (prLabels.includes("new script")) {
const newScriptCategory = categorizedPRs.find(category => const newScriptCategory = categorizedPRs.find(category =>
category.title === "New Scripts" || category.labels.includes("new script")); category.title === "New Scripts" || category.labels.includes("new script"));

View File

@ -15,9 +15,6 @@ update_os
msg_info "Installing Dependencies" msg_info "Installing Dependencies"
$STD apt-get install -y \ $STD apt-get install -y \
sudo \
mc \
curl \
apt-transport-https \ apt-transport-https \
ca-certificates \ ca-certificates \
gpg gpg

View File

@ -24,7 +24,7 @@ msg_info "Setup qBittorrent-nox"
FULLRELEASE=$(curl -s https://api.github.com/repos/userdocs/qbittorrent-nox-static/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') FULLRELEASE=$(curl -s https://api.github.com/repos/userdocs/qbittorrent-nox-static/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
RELEASE=$(echo $FULLRELEASE | cut -c 9-13) RELEASE=$(echo $FULLRELEASE | cut -c 9-13)
mkdir -p /opt/qbittorrent mkdir -p /opt/qbittorrent
curl -fsSL "https://github.com/userdocs/qbittorrent-nox-static/releases/download/${FULLRELEASE}/x86_64-qbittorrent-nox -o /opt/qbittorrent/qbittorrent-nox" curl -fsSL "https://github.com/userdocs/qbittorrent-nox-static/releases/download/${FULLRELEASE}/x86_64-qbittorrent-nox" -o /opt/qbittorrent/qbittorrent-nox
chmod +x /opt/qbittorrent/qbittorrent-nox chmod +x /opt/qbittorrent/qbittorrent-nox
mkdir -p $HOME/.config/qBittorrent/ mkdir -p $HOME/.config/qBittorrent/
cat <<EOF >$HOME/.config/qBittorrent/qBittorrent.conf cat <<EOF >$HOME/.config/qBittorrent/qBittorrent.conf