Skip to content

Fix .github/workflows setup and implement auto-merge workflow#1

Merged
jaseel0 merged 2 commits intomainfrom
copilot/setup-github-workflow
Feb 20, 2026
Merged

Fix .github/workflows setup and implement auto-merge workflow#1
jaseel0 merged 2 commits intomainfrom
copilot/setup-github-workflow

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 20, 2026

The workflows directory was misnamed (.github/workflow instead of .github/workflows), causing GitHub Actions to ignore it entirely. The auto-pr-merge.yml file was also empty.

Changes

  • Renamed .github/workflow/.github/workflows/ (GitHub Actions requirement)
  • Implemented auto-pr-merge.yml workflow:
    • Triggers on PR open/sync/reopen events
    • Validates PR touches only Contributors.md via git diff against base branch
    • Squash-merges qualifying PRs immediately; skips silently otherwise
- name: Check only Contributors.md was modified
  id: check-files
  run: |
    CHANGED=$(git diff --name-only origin/${{ github.base_ref }}...HEAD)
    if [ "$CHANGED" = "Contributors.md" ]; then
      echo "valid=true" >> $GITHUB_OUTPUT
    else
      echo "valid=false" >> $GITHUB_OUTPUT
    fi

- name: Auto-merge PR
  if: steps.check-files.outputs.valid == 'true'
  run: gh pr merge --squash "${{ github.event.pull_request.number }}"
  env:
    GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Co-authored-by: jaseel0 <225665919+jaseel0@users.noreply.github.com>
Copilot AI changed the title [WIP] Set up .github directory and workflows Fix .github/workflows setup and implement auto-merge workflow Feb 20, 2026
Copilot AI requested a review from jaseel0 February 20, 2026 06:18
@jaseel0 jaseel0 requested a review from naheel0 February 20, 2026 06:24
@naheel0 naheel0 marked this pull request as ready for review February 20, 2026 06:24
@jaseel0 jaseel0 merged commit af0922a into main Feb 20, 2026
1 check passed
@jaseel0 jaseel0 deleted the copilot/setup-github-workflow branch February 20, 2026 06:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants