Skip to content

Commit

Permalink
Improve filter to find 3rd party repos (#255)
Browse files Browse the repository at this point in the history
  • Loading branch information
sidey79 authored Jul 13, 2024
2 parents 0fdce6d + ed8dd55 commit 9470968
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -497,4 +497,16 @@ To run the test, build the image with the specific target:
Then this image, can be used to start a new container and running bats inside the container.
docker run -it --rm -v "${PWD}/src/tests/bats:/code" fhemdocker:test .
## A needed perl module is missing
If you are running a 3rd party module, advice the maintainer to this description:
During docker build, repositorys are searched by topics and content in the readme.md file.
If the build finds your repository, it will check automatically, what perl modules are needed.
Modules wich are found will be installed via cpan in the resulting docker image.
This allows users of the docker image to use your module.
Add the topic 'fhem' and 'perl' and provide an instruction in your readme.md with
instruction how to use update add / update all to install your module.
7 changes: 5 additions & 2 deletions scripts/get-FHEMRepositorys.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@

# GitHub API-URL für die Suche nach FHEM-Repositorys
BASE_URL="https://api.github.com/search/repositories"
TAG="FHEM"
TOPIC="topic:FHEM"
README='"update+all+https%3A%2F%2Fraw.githubusercontent.com"+OR++in%3Areadme+"update+add+https%3A%2F%2Fraw.githubusercontent.com"'

# Anzahl der Ergebnisse, die du anzeigen möchtest
PER_PAGE=2000

in%3Areadme+"update+all+https%3A%2F%2Fraw.githubusercontent.com"+OR++in%3Areadme+"update+add+https%3A%2F%2Fraw.githubusercontent.com"
# API-Anfrage an GitHub
response=$(curl -s "$BASE_URL?q=topic:$TAG+language:Perl+archived:false&sort=stars&order=desc&per_page=$PER_PAGE")
response=$(curl -s "$BASE_URL?q=${TOPIC}+archived:false+${README}&sort=stars&order=desc&per_page=$PER_PAGE")


# Verarbeite die Antwort
if [[ $response == *"items"* ]]; then
Expand Down

0 comments on commit 9470968

Please sign in to comment.