Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
527d4f3b6e |
@@ -0,0 +1,15 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: # Replace with a single Open Collective username
|
||||
ko_fi: FrauJulian
|
||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
|
||||
polar: # Replace with a single Polar username
|
||||
buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
|
||||
thanks_dev: # Replace with a single thanks.dev username
|
||||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
||||
@@ -0,0 +1,11 @@
|
||||
# To get started with Dependabot version updates, you'll need to specify which
|
||||
# package ecosystems to update and where the package manifests are located.
|
||||
# Please see the documentation for all configuration options:
|
||||
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: 'npm' # See documentation for possible values
|
||||
directory: '/' # Location of package manifests
|
||||
schedule:
|
||||
interval: 'daily'
|
||||
@@ -9,7 +9,6 @@ permissions:
|
||||
env:
|
||||
VERSION_MAJOR: '1'
|
||||
VERSION_MINOR: '1'
|
||||
VERSION_PATCH: ${{ gitea.run_number }}
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -40,7 +39,7 @@ jobs:
|
||||
id: release_version
|
||||
run: |
|
||||
package_version="$(node -p "require('./package.json').version")"
|
||||
echo "tag=${package_version}" >> "$GITEA_OUTPUT"
|
||||
echo "tag=${package_version}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Run Build
|
||||
run: npm run build
|
||||
@@ -50,29 +49,24 @@ jobs:
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
|
||||
- name: Create Gitea release
|
||||
- name: Create GitHub release
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||
GITEA_API_URL: ${{ gitea.api_url }}
|
||||
GITEA_REPOSITORY: ${{ gitea.repository }}
|
||||
GITEA_SERVER_URL: ${{ gitea.server_url }}
|
||||
GITEA_SHA: ${{ gitea.sha }}
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
RELEASE_TAG: v${{ steps.release_version.outputs.tag }}
|
||||
run: |
|
||||
git fetch --force --tags
|
||||
|
||||
releases_url="${GITEA_API_URL}/repos/${GITEA_REPOSITORY}/releases"
|
||||
previous_tag="$(curl --fail --silent --show-error --header "Authorization: token ${GITEA_TOKEN}" "${releases_url}?limit=50" | jq -r --arg tag "$RELEASE_TAG" '[.[] | select(.draft == false and .tag_name != $tag)][0].tag_name // empty')"
|
||||
previous_tag="$(gh api repos/${{ github.repository }}/releases --paginate --jq '.[] | select(.draft == false) | .tag_name' | grep -Fxv "$RELEASE_TAG" | head -n 1 || true)"
|
||||
|
||||
if [ -n "$previous_tag" ]; then
|
||||
if git rev-parse --verify --quiet "${previous_tag}^{commit}" >/dev/null; then
|
||||
commit_messages="$(git log --reverse --format='- %s' "${previous_tag}..${GITEA_SHA}")"
|
||||
commit_messages="$(git log --reverse --format='- %s' "${previous_tag}..${GITHUB_SHA}")"
|
||||
else
|
||||
commit_messages="$(git log --reverse --format='- %s' "${GITEA_SHA}")"
|
||||
commit_messages="$(git log --reverse --format='- %s' "${GITHUB_SHA}")"
|
||||
fi
|
||||
full_changelog="${GITEA_SERVER_URL}/${GITEA_REPOSITORY}/compare/${previous_tag}...${RELEASE_TAG}"
|
||||
full_changelog="https://github.com/${{ github.repository }}/compare/${previous_tag}...${RELEASE_TAG}"
|
||||
else
|
||||
commit_messages="$(git log --reverse --format='- %s' "${GITEA_SHA}")"
|
||||
commit_messages="$(git log --reverse --format='- %s' "${GITHUB_SHA}")"
|
||||
full_changelog=""
|
||||
fi
|
||||
|
||||
@@ -90,13 +84,8 @@ jobs:
|
||||
fi
|
||||
} > release-notes.md
|
||||
|
||||
jq -n --arg tag "$RELEASE_TAG" --arg target "$GITEA_SHA" --rawfile body release-notes.md \
|
||||
'{tag_name: $tag, target_commitish: $target, name: $tag, body: $body, draft: false, prerelease: false}' > release.json
|
||||
|
||||
release_id="$(curl --silent --header "Authorization: token ${GITEA_TOKEN}" "${releases_url}/tags/${RELEASE_TAG}" | jq -r '.id // empty')"
|
||||
|
||||
if [ -n "$release_id" ]; then
|
||||
curl --fail-with-body --request PATCH --header "Authorization: token ${GITEA_TOKEN}" --header 'Content-Type: application/json' --data @release.json "${releases_url}/${release_id}"
|
||||
if gh release view "$RELEASE_TAG" >/dev/null 2>&1; then
|
||||
gh release edit "$RELEASE_TAG" --title "$RELEASE_TAG" --notes-file release-notes.md
|
||||
else
|
||||
curl --fail-with-body --request POST --header "Authorization: token ${GITEA_TOKEN}" --header 'Content-Type: application/json' --data @release.json "$releases_url"
|
||||
gh release create "$RELEASE_TAG" --target "${GITHUB_SHA}" --title "$RELEASE_TAG" --notes-file release-notes.md
|
||||
fi
|
||||
@@ -1,106 +0,0 @@
|
||||
name: Redirect contributions to Gitea
|
||||
|
||||
on:
|
||||
issues:
|
||||
types: [opened, reopened]
|
||||
pull_request_target:
|
||||
types: [opened, reopened]
|
||||
|
||||
permissions:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
|
||||
concurrency:
|
||||
group: migrate-${{ github.event_name }}-${{ github.event.issue.number || github.event.pull_request.number }}
|
||||
|
||||
env:
|
||||
GITEA_API_URL: https://git.lechner-systems.at/api/v1
|
||||
GITEA_REPOSITORY: FrauJulian/Discord-Audio-Stream
|
||||
|
||||
jobs:
|
||||
migrate-issue:
|
||||
if: github.event_name == 'issues'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Migrate issue and close
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
||||
number="$(jq -r '.issue.number' "$GITHUB_EVENT_PATH")"
|
||||
title="$(jq -r '.issue.title' "$GITHUB_EVENT_PATH")"
|
||||
body="$(jq -r '.issue.body // ""' "$GITHUB_EVENT_PATH")"
|
||||
author="$(jq -r '.issue.user.login' "$GITHUB_EVENT_PATH")"
|
||||
source_url="$(jq -r '.issue.html_url' "$GITHUB_EVENT_PATH")"
|
||||
github_api="${GITHUB_API_URL}/repos/${GITHUB_REPOSITORY}"
|
||||
migrated_url="$(
|
||||
curl --fail --silent --show-error \
|
||||
--header "Authorization: Bearer ${GITHUB_TOKEN}" \
|
||||
--header "Accept: application/vnd.github+json" \
|
||||
"${github_api}/issues/${number}/comments?per_page=100" |
|
||||
jq -r '[.[] | select(.user.login == "github-actions[bot]" and (.body | startswith("Migrated to Gitea: ")))] | first | .body // "" | sub("^Migrated to Gitea: "; "")'
|
||||
)"
|
||||
|
||||
if [ -z "$migrated_url" ]; then
|
||||
migrated_body="${body}
|
||||
|
||||
---
|
||||
Originally opened by @${author} on GitHub: ${source_url}"
|
||||
|
||||
jq -n \
|
||||
--arg title "$title" \
|
||||
--arg body "$migrated_body" \
|
||||
'{title: $title, body: $body}' > gitea-request.json
|
||||
|
||||
curl --fail-with-body \
|
||||
--request POST \
|
||||
--header "Authorization: token ${GITEA_TOKEN}" \
|
||||
--header "Content-Type: application/json" \
|
||||
--data @gitea-request.json \
|
||||
"${GITEA_API_URL}/repos/${GITEA_REPOSITORY}/issues" > gitea-response.json
|
||||
|
||||
migrated_url="$(jq -r '.html_url' gitea-response.json)"
|
||||
jq -n --arg body "Migrated to Gitea: ${migrated_url}" '{body: $body}' > github-comment.json
|
||||
curl --fail-with-body \
|
||||
--request POST \
|
||||
--header "Authorization: Bearer ${GITHUB_TOKEN}" \
|
||||
--header "Content-Type: application/json" \
|
||||
--data @github-comment.json \
|
||||
"${github_api}/issues/${number}/comments"
|
||||
fi
|
||||
|
||||
curl --fail-with-body \
|
||||
--request PATCH \
|
||||
--header "Authorization: Bearer ${GITHUB_TOKEN}" \
|
||||
--header "Content-Type: application/json" \
|
||||
--data '{"state":"closed","state_reason":"not_planned"}' \
|
||||
"${github_api}/issues/${number}"
|
||||
|
||||
redirect-pull-request:
|
||||
if: github.event_name == 'pull_request_target'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Redirect pull request and close
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
||||
number="$(jq -r '.pull_request.number' "$GITHUB_EVENT_PATH")"
|
||||
github_api="${GITHUB_API_URL}/repos/${GITHUB_REPOSITORY}"
|
||||
|
||||
curl --fail-with-body \
|
||||
--request POST \
|
||||
--header "Authorization: Bearer ${GITHUB_TOKEN}" \
|
||||
--header "Content-Type: application/json" \
|
||||
--data '{"body":"Please open the Pull Request on Gitea"}' \
|
||||
"${github_api}/issues/${number}/comments"
|
||||
|
||||
curl --fail-with-body \
|
||||
--request PATCH \
|
||||
--header "Authorization: Bearer ${GITHUB_TOKEN}" \
|
||||
--header "Content-Type: application/json" \
|
||||
--data '{"state":"closed"}' \
|
||||
"${github_api}/pulls/${number}"
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
.gitea
|
||||
.github
|
||||
.git
|
||||
|
||||
.idea
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# Discord Audio Stream
|
||||
|
||||
[](http://npmjs.org/package/discord-audio-stream)
|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
`discord-audio-stream` is a small TypeScript library for managed Discord voice playback through
|
||||
`@discordjs/voice` and ffmpeg.
|
||||
@@ -13,7 +13,7 @@ reused.
|
||||
|
||||
## Support
|
||||
|
||||
Create an [issue](https://git.lechner-systems.at/FrauJulian/Discord-Audio-Stream/issues) on Gitea or contact
|
||||
Create an [issue](https://github.com/FrauJulian/Discord-Audio-Stream/issues) on GitHub or contact
|
||||
[`fraujulian`](https://discord.com/users/860206216893693973) on Discord.
|
||||
|
||||
## Installation
|
||||
@@ -204,4 +204,4 @@ npm run build
|
||||
|
||||
## Enjoy the package?
|
||||
|
||||
Give it a star on [Gitea](https://git.lechner-systems.at/FrauJulian/Discord-Audio-Stream)!
|
||||
Give it a star on [GitHub](https://github.com/FrauJulian/discord-audio-stream)!
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ If a vulnerability is fixed, the fix will generally be released only for the cur
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
Do not open a public Gitea issue for security vulnerabilities.
|
||||
Do not open a public GitHub issue for security vulnerabilities.
|
||||
|
||||
Report vulnerabilities privately by email to `fraujulian@lechner.top`.
|
||||
|
||||
|
||||
Generated
+3
-3
@@ -8116,9 +8116,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/prettier": {
|
||||
"version": "3.9.4",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.9.4.tgz",
|
||||
"integrity": "sha512-yWG/o/4oJfo036EKAfK6ACAoDOfHeRHx4tuxkfBZiauURiaSmYwlpOr5LQqKtIkRD2z1PLteme2WoxEnj4tHTg==",
|
||||
"version": "3.9.5",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.9.5.tgz",
|
||||
"integrity": "sha512-/FVl766LpUfB5vXgCYOYa0MeV/441Ia99AeICQIQFTY/Nw0roZwULcXpku5i1/m5kt/baz+s4Zogspd839HSMg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
|
||||
+2
-2
@@ -43,9 +43,9 @@
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://git.lechner-systems.at/FrauJulian/Discord-Audio-Stream.git"
|
||||
"url": "git+https://github.com/FrauJulian/Discord-Audio-Stream.git"
|
||||
},
|
||||
"bugs": "https://git.lechner-systems.at/FrauJulian/Discord-Audio-Stream/issues",
|
||||
"bugs": "https://github.com/FrauJulian/Discord-Audio-Stream/issues",
|
||||
"funding": "https://ko-fi.com/FrauJulian",
|
||||
"keywords": [
|
||||
"discord",
|
||||
|
||||
+1
-1
@@ -76,7 +76,7 @@ function fixPlaceholder() {
|
||||
function getCiVersion() {
|
||||
const major = process.env.VERSION_MAJOR;
|
||||
const minor = process.env.VERSION_MINOR;
|
||||
const patch = process.env.VERSION_PATCH;
|
||||
const patch = process.env.VERSION_PATCH ?? process.env.GITHUB_RUN_NUMBER;
|
||||
const segments = { major, minor, patch };
|
||||
|
||||
for (const [name, value] of Object.entries(segments)) {
|
||||
|
||||
Reference in New Issue
Block a user