-
Notifications
You must be signed in to change notification settings - Fork 233
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/main' into multi-selection
- Loading branch information
Showing
28 changed files
with
864 additions
and
109 deletions.
There are no files selected for viewing
File renamed without changes.
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
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
This file was deleted.
Oops, something went wrong.
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
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
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,50 @@ | ||
name: Manage labels based on PR body | ||
|
||
on: | ||
pull_request: | ||
types: [opened, edited, reopened, synchronize] | ||
|
||
jobs: | ||
manage-labels: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Analyze PR Body and manage labels | ||
run: | | ||
body="${{ github.event.pull_request.body }}" | ||
labels_to_add=() | ||
labels_to_remove=() | ||
declare -A label_checks=( | ||
["New feature"]="enhancement" | ||
["Bug fix|Hotfix|Security patch"]="bug" | ||
["Documentation update"]="documentation" | ||
["Refactoring"]="refactor" | ||
["UI/UX improvement"]="UI/UX" | ||
) | ||
for key in "${!label_checks[@]}"; do | ||
if echo "$body" | grep -q "\- \[x\] $key"; then | ||
labels_to_add+=("${label_checks[$key]}") | ||
else | ||
labels_to_remove+=("${label_checks[$key]}") | ||
fi | ||
done | ||
echo "LABELS_TO_ADD=${labels_to_add[*]}" >> $GITHUB_ENV | ||
echo "LABELS_TO_REMOVE=${labels_to_remove[*]}" >> $GITHUB_ENV | ||
- name: Add labels if necessary | ||
if: env.LABELS_TO_ADD != '' | ||
run: | | ||
for label in ${{ env.LABELS_TO_ADD }}; do | ||
curl -s -X POST \ | ||
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | ||
-H "Accept: application/vnd.github.v3+json" \ | ||
-d "{\"labels\": [\"$label\"]}" \ | ||
https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/labels | ||
done | ||
- name: Remove labels if necessary | ||
if: env.LABELS_TO_REMOVE != '' | ||
run: | | ||
for label in ${{ env.LABELS_TO_REMOVE }}; do | ||
curl -s -X DELETE \ | ||
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | ||
-H "Accept: application/vnd.github.v3+json" \ | ||
https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/labels/$label | ||
done |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
/build | ||
rust/target | ||
rust/build | ||
/build/linutil |
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
Binary file not shown.
File renamed without changes.
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
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
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,33 @@ | ||
#!/bin/sh -e | ||
|
||
. ../common-script.sh | ||
|
||
setupFastfetch() { | ||
echo "Installing Fastfetch if not already installed..." | ||
if ! command_exists fastfetch; then | ||
case ${PACKAGER} in | ||
pacman) | ||
$ESCALATION_TOOL "${PACKAGER}" -S --needed --noconfirm fastfetch | ||
;; | ||
*) | ||
$ESCALATION_TOOL "${PACKAGER}" install -y fastfetch | ||
;; | ||
esac | ||
else | ||
echo "Fastfetch is already installed." | ||
fi | ||
} | ||
|
||
setupFastfetchConfig() { | ||
echo "Copying Fastfetch config files..." | ||
if [ -d "${HOME}/.config/fastfetch" ] && [ ! -d "${HOME}/.config/fastfetch-bak" ]; then | ||
cp -r "${HOME}/.config/fastfetch" "${HOME}/.config/fastfetch-bak" | ||
fi | ||
mkdir -p "${HOME}/.config/fastfetch/" | ||
curl -sSLo "${HOME}/.config/fastfetch/config.jsonc" https://raw.githubusercontent.com/ChrisTitusTech/mybash/main/config.jsonc | ||
} | ||
|
||
checkEnv | ||
checkEscalationTool | ||
setupFastfetch | ||
setupFastfetchConfig |
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
Oops, something went wrong.