Skip to content

Auto-merge workflow skips comment when Contributors.md has multiple line changes #111414

@Sunil0620

Description

@Sunil0620

🐞 Problem
The auto_merge_prs.yml workflow has a logic gap that leaves contributors without feedback.
When a PR:

  • Only modifies Contributors.md (only_contributors == 'true')
  • Has more than 1-2 line changes (one_line_change == 'false')
    the auto-merge step AND the comment step are skipped in the auto_merge_prs.yml workflow, leaving contributors without any feedback from the bot.
Image **Example:** PR #111402 modified only Contributors.md but received no bot acknowledgment. - **Merge step** requires: `only_contributors == 'true' && one_line_change == 'true'` - **Comment step** requires: `only_contributors != 'true'` - **Gap:** When `only_contributors == 'true' && one_line_change == 'false'`, neither runs!

🎯 Goal
While Contributors.md content doesn't matter contributor experience does. This fix ensures:

  • All contributors get feedback - whether their PR is auto-merged or needs review
  • No silent failures - contributors understand what's happening with their PR
  • Consistency - the bot responds to all PR types, not just some
  • Better onboarding - new contributors aren't left confused when automation doesn't respond
    This doesn't change how Contributors.md works, it just fixes the communication gap.
    💡 Possible solutions
    Add a new step in .github/workflows/auto_merge_prs.yml after the "Merge PR" step:
- name: Post comment if Contributors.md has too many changes
  if: env.only_contributors == 'true' && env.one_line_change == 'false'
  uses: actions/github-script@v6
  with:
    script: |
      await github.rest.issues.createComment({
        owner: context.repo.owner,
        repo: context.repo.name,
        issue_number: context.issue.number,
        body: "Thank you for your pull request!  \n\nThis PR modifies Contributors.md with multiple changes. A maintainer will review it soon!\n\nThank you for your contribution! "
      })
    github-token: ${{ secrets.GITHUB_TOKEN }}

📋 Steps to solve the problem

  • Comment below about what you've started working on.
  • Add, commit, push your changes.
  • Submit a pull request and add this in comments - Addresses #<put issue number here>
  • Ask for reviews in comments section of pull request.
  • Celebrate your contribution to this project. 🎉

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions