forked from TRaSH-Guides/Guides
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
157 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
{ | ||
"categories": [ | ||
{ | ||
"title": "### Guide - Features", | ||
"labels": ["type: enhancement", "type: guide request"], | ||
"exhaustive": true | ||
}, | ||
{ | ||
"title": "### Guide - Fixes", | ||
"labels": ["type: bug"], | ||
"exclude_labels": ["status: non issue"] | ||
}, | ||
{ | ||
"title": "### Guide - Updates", | ||
"labels": ["status: confirmed"] | ||
}, | ||
{ | ||
"title": "### Radarr - Features", | ||
"labels": ["area: radarr", "type: enhancement"], | ||
"exhaustive": true | ||
}, | ||
{ | ||
"title": "### Radarr - Fixes", | ||
"labels": ["area: radarr", "type: bug"], | ||
"exclude_labels": ["status: non issue"], | ||
"exhaustive": true | ||
}, | ||
{ | ||
"title": "### Radarr - Updates", | ||
"labels": ["area: radarr"] | ||
}, | ||
{ | ||
"title": "### Sonarr - Features", | ||
"labels": ["area: sonarr", "type: enhancement"], | ||
"exhaustive": true | ||
}, | ||
{ | ||
"title": "### Sonarr - Fixes", | ||
"labels": ["area: sonarr", "type: bug"], | ||
"exclude_labels": ["status: non issue"], | ||
"exhaustive": true | ||
}, | ||
{ | ||
"title": "### Sonarr - Updates", | ||
"labels": ["area: sonarr"] | ||
}, | ||
{ | ||
"title": "### Others", | ||
"labels": [] | ||
} | ||
], | ||
"ignore_labels": ["status: declined"], | ||
"sort": { | ||
"order": "ASC", | ||
"on_property": "title" | ||
}, | ||
"template": "${{CHANGELOG}}\n${{UNCATEGORIZED}}", | ||
"pr_template": "- [${{TITLE}}](${{URL}})", | ||
"empty_template": "- no changes", | ||
"base_branches": [ | ||
"master" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
const axios = require('axios'); | ||
const fs = require('fs'); | ||
|
||
// Indentation function | ||
function indentString(string, indentation) { | ||
return string.split('\n').map(line => indentation + line).join('\n'); | ||
} | ||
|
||
let contributors = '<table style="width: 100%;">\n'; | ||
let index = 0; | ||
let page = 1; | ||
|
||
function fetchPage() { | ||
axios.get(`https://api.github.com/repos/FonduemangVI/Guides/contributors?per_page=100&page=${page}`) | ||
.then((response) => { | ||
if (response.data.length === 0) { | ||
// No more contributors, write the file | ||
if (index % 5 !== 0) { | ||
contributors += '</tr>\n'; // Close the row if it's not already closed | ||
} | ||
contributors += '</table>\n'; | ||
contributors = indentString(contributors, ''); | ||
|
||
fs.writeFileSync('CONTRIBUTORS.md', `## Contributors\n\n<!-- readme: contributors -start -->\n${contributors}\n<!-- readme: contributors -end -->\n`); | ||
return; | ||
} | ||
|
||
response.data.forEach((user) => { | ||
// Exclude bots and actions-user | ||
if (user.type === 'Bot' || user.login.toLowerCase().includes('bot') || user.login === 'actions-user' || user.login === 'mynameisbogdan') return; | ||
|
||
if (index % 5 === 0) { | ||
contributors += '<tr>'; | ||
} | ||
|
||
const userHtml = ` | ||
<td align="center"> | ||
<img src="${user.avatar_url}&v=4" style="width: 50px; border-radius: 50%;" alt="${user.login}"/> | ||
<br /> | ||
<b><a href="${user.html_url}">${user.login}</a></b> | ||
</td>`; | ||
|
||
contributors += indentString(userHtml, ' '); | ||
|
||
if ((index + 1) % 5 === 0 || index === response.data.length - 1) { | ||
contributors += '\n</tr>\n'; | ||
} | ||
|
||
index++; | ||
}); | ||
|
||
// Fetch the next page | ||
page++; | ||
fetchPage(); | ||
}) | ||
.catch((error) => { | ||
console.error(`Could not fetch contributors: ${error}`); | ||
}); | ||
} | ||
|
||
fetchPage(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Release Creation | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
# Build the changelog | ||
- name: Build Changelog | ||
id: build_changelog | ||
uses: mikepenz/release-changelog-builder-action@v4 | ||
with: | ||
configuration: ".github/configs/release-changelog-builder-action.json" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# Change the update file | ||
- name: Modify updates.txt | ||
uses: jaywcjlove/github-action-modify-file-content@main | ||
with: | ||
path: docs/updates.txt | ||
body: "#{{date:YYYY-MM-DD HH:mm}}\n${{ steps.build_changelog.outputs.changelog }}" | ||
openDelimiter: "" | ||
closeDelimiter: "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.