Skip to content

Commit

Permalink
Merge pull request #1523 from pi-hole/development
Browse files Browse the repository at this point in the history
v5.20.1
  • Loading branch information
PromoFaux authored Jan 15, 2023
2 parents 110691a + 4e0face commit 47128aa
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 29 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
steps:
-
name: Checkout code
uses: actions/checkout@v3.1.0
uses: actions/checkout@v3.3.0
-
name: "Calculate required variables"
id: variables
Expand Down Expand Up @@ -88,7 +88,7 @@ jobs:
steps:
-
name: Checkout code
uses: actions/checkout@v3.1.0
uses: actions/checkout@v3.3.0
-
name: "Fix ownership of repository"
run: chown -R root .
Expand Down Expand Up @@ -119,7 +119,7 @@ jobs:
-
name: Upload artifacts to job for later processing
if: github.event_name != 'pull_request'
uses: actions/upload-artifact@v3.1.1
uses: actions/upload-artifact@v3.1.2
with:
name: tmp-binary-storage
path: '${{ matrix.bin_name }}*'
Expand All @@ -131,10 +131,10 @@ jobs:
steps:
-
name: Checkout code
uses: actions/checkout@v3.1.0
uses: actions/checkout@v3.3.0
-
name: Get Binaries built in previous jobs
uses: actions/download-artifact@v3.0.1
uses: actions/download-artifact@v3.0.2
id: download
with:
name: tmp-binary-storage
Expand All @@ -145,12 +145,13 @@ jobs:
working-directory: ${{steps.download.outputs.download-path}}
-
name: Install SSH Key
uses: benoitchantre/setup-ssh-authentication-action@1.0.0
uses: benoitchantre/setup-ssh-authentication-action@1.0.1
with:
private-key: ${{ secrets.SSH_KEY }}
known-hosts: ${{ secrets.KNOWN_HOSTS }}
-
name: Transfer Builds to Pi-hole server for pihole checkout
if: github.actor != 'dependabot[bot]'
env:
USER: ${{ secrets.SSH_USER }}
HOST: ${{ secrets.SSH_HOST }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
steps:
-
name: Checkout repository
uses: actions/checkout@v3.1.0
uses: actions/checkout@v3.3.0
-
name: Spell-Checking
uses: codespell-project/actions-codespell@master
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/merge-conflict.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: "Check for merge conflicts"
on:
# So that PRs touching the same files as the push are updated
push:
# So that the `dirtyLabel` is removed if conflicts are resolve
# We recommend `pull_request_target` so that github secrets are available.
# In `pull_request` we wouldn't be able to change labels of fork PRs
pull_request_target:
types: [synchronize]

jobs:
main:
runs-on: ubuntu-latest
steps:
- name: Check if PRs are have merge conflicts
uses: eps1lon/actions-label-merge-conflict@v2.1.0
with:
dirtyLabel: "Merge conflicts"
repoToken: "${{ secrets.GITHUB_TOKEN }}"
commentOnDirty: "This pull request has conflicts, please resolve those before we can evaluate the pull request."
commentOnClean: "Conflicts have been resolved."
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
issues: write

steps:
- uses: actions/stale@v6.0.1
- uses: actions/stale@v7.0.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 30
Expand Down
15 changes: 3 additions & 12 deletions .github/workflows/sync-back-to-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,8 @@ jobs:
name: Syncing branches
steps:
- name: Checkout
uses: actions/checkout@v3.1.0
uses: actions/checkout@v3.3.0
- name: Opening pull request
id: pull
uses: tretuna/sync-branches@1.4.0
with:
run: gh pr create -B development -H master --title 'Sync master back into development' --body 'Created by Github action' --label 'internal'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
FROM_BRANCH: 'master'
TO_BRANCH: 'development'
- name: Label the pull request to ignore for release note generation
uses: actions-ecosystem/action-add-labels@v1.1.3
with:
labels: internal
repo: ${{ github.repository }}
number: ${{ steps.pull.outputs.PULL_REQUEST_NUMBER }}
12 changes: 5 additions & 7 deletions src/args.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ const char** argv_dnsmasq = NULL;
#define COL_ULINE "\x1b[4m" // underline font
#define COL_GREEN "\x1b[32m" // normal foreground color
#define COL_YELLOW "\x1b[33m" // normal foreground color
#define COL_GRAY "\x1b[90m" // bright foreground color
#define COL_RED "\x1b[91m" // bright foreground color
#define COL_BLUE "\x1b[94m" // bright foreground color
#define COL_PURPLE "\x1b[95m" // bright foreground color
Expand Down Expand Up @@ -431,7 +430,6 @@ void parse_args(int argc, char* argv[])
const char *normal = cli_normal();
const char *blue = cli_color(COL_BLUE);
const char *cyan = cli_color(COL_CYAN);
const char *gray = cli_color(COL_GRAY);
const char *green = cli_color(COL_GREEN);
const char *yellow = cli_color(COL_YELLOW);
const char *purple = cli_color(COL_PURPLE);
Expand All @@ -458,8 +456,8 @@ void parse_args(int argc, char* argv[])

printf(" Example: %spihole-FTL regex-test %ssomebad.domain %sbad%s\n", green, blue, cyan, normal);
printf(" to test %ssomebad.domain%s against %sbad%s\n\n", blue, normal, cyan, normal);
printf(" An optional %s-q%s prevents any output (exit code testing):\n", gray, normal);
printf(" %spihole-FTL %s-q%s regex-test %ssomebad.domain %sbad%s\n\n", green, gray, green, blue, cyan, normal);
printf(" An optional %s-q%s prevents any output (exit code testing):\n", purple, normal);
printf(" %spihole-FTL %s-q%s regex-test %ssomebad.domain %sbad%s\n\n", green, purple, green, blue, cyan, normal);

printf("%sEmbedded Lua engine:%s\n", yellow, normal);
printf("\t%s--lua%s, %slua%s FTL's lua interpreter\n", green, normal, green, normal);
Expand All @@ -476,10 +474,10 @@ void parse_args(int argc, char* argv[])
printf(" the script.\n\n");

printf("%sEmbedded SQLite3 shell:%s\n", yellow, normal);
printf("\t%ssql %s[-h]%s, %ssqlite3 %s[-h]%s FTL's SQLite3 shell\n", green, gray, normal, green, gray, normal);
printf("\t%s-h%s starts a special %shuman-readable mode%s\n\n", gray, normal, bold, normal);
printf("\t%ssql %s[-h]%s, %ssqlite3 %s[-h]%s FTL's SQLite3 shell\n", green, purple, normal, green, purple, normal);
printf("\t%s-h%s starts a special %shuman-readable mode%s\n\n", purple, normal, bold, normal);

printf(" Usage: %spihole-FTL sqlite3 %s[-h] %s[OPTIONS] [FILENAME] [SQL]%s\n\n", green, gray, cyan, normal);
printf(" Usage: %spihole-FTL sqlite3 %s[-h] %s[OPTIONS] [FILENAME] [SQL]%s\n\n", green, purple, cyan, normal);
printf(" Options:\n\n");
printf(" - %s[OPTIONS]%s is an optional set of options. All available\n", cyan, normal);
printf(" options can be found in %spihole-FTL sqlite3 --help%s\n", green, normal);
Expand Down
3 changes: 1 addition & 2 deletions src/database/query-table.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@ int DB_save_queries(sqlite3 *db)
return DB_FAILED;

// Start database timer
if(config.debug & DEBUG_DATABASE)
timer_start(DATABASE_WRITE_TIMER);
timer_start(DATABASE_WRITE_TIMER);

// Open pihole-FTL.db database file if needed
bool db_opened = false;
Expand Down

0 comments on commit 47128aa

Please sign in to comment.