Skip to content

Commit

Permalink
Ajout automatique du lien de la review app dans la PR
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoineGirard committed Nov 20, 2024
1 parent a99f182 commit 87aed04
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ rswag: ## Re-generate swagger/v1/api.json by running API specs
.DEFAULT_GOAL := help

review_app: ## Create Scalingo review app for the PR linked to the current branch
scalingo --region osc-secnum-fr1 --app demo-rdv-solidarites integration-link-manual-review-app `gh pr view --json number --jq '.number'`
/bin/sh scripts/create_review_app.sh

help: ## Display available commands
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
7 changes: 7 additions & 0 deletions scripts/create_review_app.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh

scalingo --region osc-secnum-fr1 --app demo-rdv-solidarites integration-link-manual-review-app `gh pr view --json number --jq '.number'`
gh pr edit -b "$(gh pr view --json body --jq '.body' | sed "1i\\
[Review app](https://demo-rdv-solidarites-pr`gh pr view --json number --jq '.number'`.osc-secnum-fr1.scalingo.io/)
")"

0 comments on commit 87aed04

Please sign in to comment.