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
#!/bin/bash | |
# Get the current branch name | |
branch=$(git symbolic-ref --short HEAD) | |
# Extract the ticket number from the branch name e.g. feature/AB-123 | |
# This regex assumes that the ticket number is always preceded by a '/' | |
ticket_number=$(echo $branch | sed -n 's/.*\/\([A-Z]*-[0-9]*\)/\1/p') | |
# If a ticket number was found, append it to the commit message |
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
<?php | |
namespace App\Http\Middleware; | |
use Closure; | |
use Illuminate\Http\Request; | |
use Illuminate\Auth\Middleware\Authenticate as Middleware; | |
class AsJson extends Middleware | |
{ |