GitHub 404s on Dependabot PRs: A Simple Fix for Enhanced Git Productivity

A developer encountering a 404 error on a GitHub pull request page, surrounded by symbols of git productivity tools.
A developer encountering a 404 error on a GitHub pull request page, surrounded by symbols of git productivity tools.

The Case of the Disappearing Pull Requests

In the fast-paced world of software development, encountering unexpected errors can be a significant drag on git productivity tools and workflows. A recent GitHub Community discussion highlighted a particularly perplexing issue: a user, mattkrins, reported that all pull requests (PRs) for their repository were returning 404 "Page not found" errors. This was especially confusing because Dependabot was actively creating these automated PRs, yet clicking on any of them led to a dead end. Examples included:

  • https://github.com/mattkrins/mattkrins.github.io/pull/14
  • https://github.com/mattkrins/mattkrins.github.io/pull/17
  • https://github.com/mattkrins/mattkrins.github.io/pull/18

Each of these URLs, and others, consistently resulted in a 404 page, leaving the developer unable to review or merge critical dependency updates.

A hand enabling the 'Pull requests' feature in GitHub settings, resolving a visibility issue and making PRs visible.
A hand enabling the 'Pull requests' feature in GitHub settings, resolving a visibility issue and making PRs visible.

The Diagnosis: A Hidden GitHub Setting

The solution, as expertly identified by community member TongyiDai, was surprisingly straightforward but easily overlooked. The repository in question had its "Pull requests" feature disabled. GitHub's metadata for the repository reported has_pull_requests: false, and GraphQL queries confirmed hasPullRequestsEnabled: false. This setting, when turned off, effectively hides all existing pull requests and causes their URLs to return a 404 error, even if they were legitimately created by tools like Dependabot.

The fix involved a simple navigation within the repository settings:

Settings → General → Features → Pull requests

By re-enabling this feature, all previously hidden pull requests become visible and accessible again. GitHub's documentation confirms that when the feature is re-enabled, pull requests that were previously added become available. After re-enabling, mattkrins could then verify the PR list and access the individual PR pages, resolving the immediate 404 symptom.

Key Takeaways for Enhanced Git Productivity

Understanding Feature Dependencies

This incident underscores the importance of understanding how repository-level feature toggles impact your development workflow and the effectiveness of your git productivity tools. Disabling the "Pull requests" feature is a powerful control that affects all PRs, regardless of their origin. For teams tracking engineering metrics examples like PR velocity or time-to-merge, ensuring this feature is enabled is fundamental for accurate data collection and smooth operations.

Managing Dependabot Automation

An important distinction to note is that disabling the "Pull requests" feature does not, by itself, stop Dependabot from creating new pull requests. Dependabot's automation is controlled by its own configuration settings. If the goal is to halt new dependency update PRs, you must disable or pause Dependabot directly. If Dependabot *did* create PRs after the repository's "Pull requests" feature was disabled, that would represent an inconsistent product behavior worth reporting to GitHub, as it suggests a disconnect between two related controls.

Best Practices for Repository Management

This discussion serves as a valuable reminder for all developers and repository maintainers:

  • Regularly review repository settings: Understand the impact of each toggle.
  • Separate concerns: Distinguish between global repository features (like enabling PRs) and specific automation tool settings (like Dependabot's update schedule).
  • Verify after changes: Always check the intended outcome after adjusting critical settings.

By paying attention to these details, teams can prevent unexpected roadblocks, ensure their git development processes run smoothly, and ultimately enhance overall developer productivity.

|

Dashboards, alerts, and review-ready summaries built on your GitHub activity.

 Install GitHub App to Start
Dashboard with engineering activity trends