github.com/quay/claircore@v1.5.28/.github/scripts/changelog-setup (about)

     1  #!/bin/sh
     2  set -e
     3  : "${remote:=$(git remote | grep -q upstream && echo upstream || echo origin)}"
     4  cat <<'.'
     5  This sets up the local repo for the changelog notes.
     6  
     7  To do so, it modifies the local git config. Please make sure you
     8  understand what this script is modifing and why.
     9  
    10  .
    11  sleep 5
    12  PS4=""
    13  set -x
    14  git config --local --type=bool notes.rewrite.rebase true
    15  git config --local --type=bool notes.rewrite.amend true 
    16  git config --local --get --fixed-value notes.rewriteRef refs/notes/changelog >/dev/null ||
    17  	git config --local --add --type=path notes.rewriteRef refs/notes/changelog
    18  git config --local --get --fixed-value notes.displayRef refs/notes/changelog >/dev/null ||
    19  	git config --local --add --type=path notes.displayRef refs/notes/changelog
    20  git config --local --get "remote.${remote}.fetch" "\\+refs/notes/changelog:refs/notes/${remote}/changelog" >/dev/null ||
    21  	git config --local --add "remote.${remote}.fetch" "+refs/notes/changelog:refs/notes/${remote}/changelog"