-
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 pull request #261 from codaqui/fix/fixing-errors-and-turn-on-pr…
…oject Corrigindo Problemas e Deixando o Projeto Ligado
- Loading branch information
Showing
2 changed files
with
25 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,14 @@ | ||
curl 'https://api.github.com/repos/codaqui/boletim-diario-seguranca/issues' | jq -r '.[0].number' >> numero_final.txt | ||
# Verify the last issue number | ||
curl 'https://api.github.com/repos/codaqui/boletim-diario-seguranca/issues' > response.json | ||
|
||
# How many issues are open? | ||
ISSUES_OPEN=$(cat response.json | jq '. | length') | ||
|
||
# Get the last issue number is not a Pull Request | ||
ISSUE_NUMBER=$(cat response.json | jq -r '.[] | select(.pull_request == null) | .number' | head -n 1) | ||
if [ -z "$ISSUE_NUMBER" ] | ||
then | ||
echo "pr" > numero_final.txt | ||
else | ||
echo $ISSUE_NUMBER > numero_final.txt | ||
fi |