forked from blockscout/blockscout
-
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.
Merge branch 'master' of https://github.com/blockscout/blockscout int…
…o sync-01-13-25
- Loading branch information
Showing
363 changed files
with
14,556 additions
and
6,799 deletions.
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
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,45 @@ | ||
#!/usr/bin/env elixir | ||
|
||
defmodule LocalHelper do | ||
# Helper function to safely get configuration values | ||
def get_config_value(config, key, name) do | ||
case Keyword.get(config, key) do | ||
nil -> {:error, name} | ||
value -> {:ok, value} | ||
end | ||
end | ||
end | ||
|
||
# Start Mix application | ||
Mix.start() | ||
|
||
# Set the Mix environment to dev (or whatever environment you need) | ||
Mix.env(:dev) | ||
|
||
# Read and evaluate the mix.exs file | ||
Code.require_file("mix.exs") | ||
|
||
# Get the applications from the project configuration | ||
apps = | ||
try do | ||
project = BlockScout.Mixfile.project() | ||
|
||
with {:ok, releases} <- LocalHelper.get_config_value(project, :releases, "releases"), | ||
{:ok, blockscout} <- LocalHelper.get_config_value(releases, :blockscout, "blockscout release"), | ||
{:ok, applications} <- LocalHelper.get_config_value(blockscout, :applications, "applications") do | ||
applications | ||
|> Keyword.keys() | ||
|> Enum.join("\n") | ||
else | ||
{:error, message} -> | ||
IO.puts(:stderr, "Error: #{message} not found in mix.exs configuration") | ||
System.halt(1) | ||
end | ||
rescue | ||
error -> | ||
IO.puts(:stderr, "Error: Failed to read mix.exs configuration - #{Exception.message(error)}") | ||
System.halt(1) | ||
end | ||
|
||
# Print the applications to stdout | ||
IO.puts(apps) |
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,22 @@ | ||
name: antiscam | ||
|
||
on: | ||
issue_comment: | ||
types: | ||
- created | ||
- edited | ||
|
||
permissions: | ||
pull-requests: write | ||
issues: write | ||
|
||
jobs: | ||
build: | ||
if: ${{ !github.event.issue.pull_request }} | ||
name: Antiscam | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: vbaranov/antiscam-action@main | ||
with: | ||
token: ${{ github.token }} |
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,22 @@ | ||
name: antispam | ||
|
||
on: | ||
issues: | ||
types: | ||
- opened | ||
- edited | ||
- reopened | ||
|
||
permissions: | ||
pull-requests: write | ||
issues: write | ||
|
||
jobs: | ||
build: | ||
name: Antispam | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: vbaranov/antispam-action@main | ||
with: | ||
token: ${{ github.token }} |
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
Oops, something went wrong.