add link submission and login feature #36
This file contains hidden or 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
| name: PR Quality Checks | |
| on: | |
| pull_request_target: | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| jobs: | |
| check-merge-commits: | |
| name: Merge Commit Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout PR code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| - name: Detect merge commits | |
| run: | | |
| BASE=${{ github.event.pull_request.base.sha }} | |
| HEAD=${{ github.event.pull_request.head.sha }} | |
| MERGE_COMMITS=$(git log --merges "$BASE".."$HEAD" --pretty=format:"%h") | |
| if [ -n "$MERGE_COMMITS" ]; then | |
| echo "::error::❌ PR contains merge commits. Please rebase instead of merging." | |
| exit 1 | |
| else | |
| echo "✅ No merge commits detected." | |
| fi |