fix(server): provision first-login git provider users #3653
Workflow file for this run
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" | |
| on: | |
| pull_request_target: | |
| types: | |
| - opened | |
| - edited | |
| - synchronize | |
| - reopened | |
| - ready_for_review | |
| jobs: | |
| validate-title: | |
| name: "Validate title" | |
| runs-on: ubuntu-latest | |
| if: ${{ !github.event.pull_request.draft }} | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| steps: | |
| - name: "Checkout repository" | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - name: "Setup Node.js" | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version: "22" | |
| cache: "npm" | |
| - name: "Install dependencies" | |
| run: npm ci | |
| - name: "Validate PR title with commitlint" | |
| id: commitlint | |
| env: | |
| PR_TITLE: ${{ github.event.pull_request.title }} | |
| run: | | |
| # Use commitlint to validate PR title (single source of truth) | |
| echo "$PR_TITLE" | npx --no-install commitlint 2>&1 | tee /tmp/commitlint-output.txt | |
| exit_code=${PIPESTATUS[1]} | |
| # Capture output for the comment | |
| { | |
| echo 'error_message<<EOF' | |
| cat /tmp/commitlint-output.txt | |
| echo 'EOF' | |
| } >> "$GITHUB_OUTPUT" | |
| exit "$exit_code" | |
| continue-on-error: true | |
| - name: "Comment on PR with validation error" | |
| uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 # v2 | |
| if: steps.commitlint.outcome == 'failure' | |
| with: | |
| header: pr-title-lint-error | |
| message: | | |
| ## ❌ PR Title Validation Failed | |
| ``` | |
| ${{ steps.commitlint.outputs.error_message }} | |
| ``` | |
| > 📖 See [CONTRIBUTING.md](https://github.com/ls1intum/Hephaestus/blob/main/CONTRIBUTING.md) for commit message guidelines. | |
| - name: "Remove error comment on success" | |
| uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 # v2 | |
| if: steps.commitlint.outcome == 'success' | |
| with: | |
| header: pr-title-lint-error | |
| delete: true | |
| - name: "Fail workflow if commitlint failed" | |
| if: steps.commitlint.outcome == 'failure' | |
| run: exit 1 | |
| assign-author: | |
| name: "Assign author" | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pull-requests: write | |
| if: github.event.action == 'opened' | |
| steps: | |
| - uses: technote-space/assign-author@9558557c5c4816f38bd06176fbc324ba14bb3160 # v1 | |
| labeler: | |
| name: "Apply labels" | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| steps: | |
| - name: "Checkout repository" | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 # v5 | |
| with: | |
| configuration-path: .github/labeler.yml | |
| - name: "Apply size and semantic labels" | |
| uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7 | |
| with: | |
| script: | | |
| const script = require('./.github/scripts/label-pr.js') | |
| await script({github, context}) |