[READ-ONLY] Mirror of https://github.com/thoda-dev/shhh. Self-hostable zero-knowledge pastebin for secrets that expire on their own
docker end-to-end-encryption nuxt nuxtjs pastebin secrets selft-hosted zero-knowledge
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071name: Pull request
on: pull_request: types: [opened, edited, synchronize, reopened]
permissions: contents: read
concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true
jobs: # The pull request title, not the individual commits: with squash merging — the default here — the # title is what becomes the commit on master, and therefore what changelogen reads. Individual # commits are covered locally by .githooks/commit-msg. title-format: name: Conventional Commit title runs-on: ubuntu-latest timeout-minutes: 5 steps: - name: Check the title is a Conventional Commit env: TITLE: ${{ github.event.pull_request.title }} run: | types='feat|fix|docs|refactor|perf|test|build|ci|chore'
if printf '%s' "$TITLE" | grep -qE "^($types)(\([a-z0-9,/.-]+\))?!?: .+"; then echo "ok: $TITLE" exit 0 fi
echo "::error::The pull request title is not a Conventional Commit: \"$TITLE\"" echo "Expected type(scope): subject, with type one of: $(printf '%s' "$types" | tr '|' ' ')" echo "It becomes the commit on master and the CHANGELOG.md entry, so it has to parse." exit 1
linked-issue: name: Closes an issue runs-on: ubuntu-latest timeout-minutes: 5 steps: # `closingIssuesReferences` is what GitHub itself resolves, so it counts both a "Closes #12" # keyword in the description and an issue linked by hand from the Development sidebar. # Grepping the body would only catch the first. - name: Check the pull request closes an issue env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} REPO: ${{ github.repository }} PR: ${{ github.event.pull_request.number }} run: | count=$(gh api graphql \ -f query=' query($owner: String!, $name: String!, $pr: Int!) { repository(owner: $owner, name: $name) { pullRequest(number: $pr) { closingIssuesReferences(first: 1) { totalCount } } } }' \ -F owner="${REPO%/*}" -F name="${REPO#*/}" -F pr="$PR" \ --jq '.data.repository.pullRequest.closingIssuesReferences.totalCount')
if [ "$count" -eq 0 ]; then echo "::error::This pull request closes no issue. Add \"Closes #123\" to the description, or link one from the Development sidebar, then push or edit to re-run." exit 1 fi
echo "Linked issues: $count"