discourse/discourse · error

Status line for upcoming change #{change_name} did not chang

Error message

Status line for upcoming change #{change_name} did not change

What it means

Error "Status line for upcoming change #{change_name} did not change" thrown in discourse/discourse.

Source

Thrown at lib/upcoming_changes/status_report.rb:301

        "##{record[:original_pr_number]}"
      end
    end

    class SourceStatusUpdater
      def initialize(settings_file:)
        @settings_file = settings_file
      end

      def update!(change_name:, next_status:)
        lines = File.readlines(@settings_file)
        status_line = status_line_for(change_name)
        raise "Could not locate status line for upcoming change: #{change_name}" if status_line.nil?

        original_line = lines.fetch(status_line)
        lines[status_line] = updated_status_line(original_line, next_status)
        if original_line == lines[status_line]
          raise "Status line for upcoming change #{change_name} did not change"
        end

        File.write(@settings_file, lines.join)
      end

      private

      def updated_status_line(line, next_status)
        match = STATUS_PATTERN.match(line)
        raise "Could not parse status line: #{line.strip}" if match.nil?

        indentation, quote, _old_status, suffix, newline = match.captures
        "#{indentation}status: #{quote}#{next_status}#{quote}#{suffix}#{newline}"
      end

      def status_line_for(change_name)
        root = Psych.parse_file(@settings_file).root
        return if !root.is_a?(Psych::Nodes::Mapping)

View on GitHub (pinned to 1b2d7253e8)

When it happens

Trigger: Thrown at lib/upcoming_changes/status_report.rb:301 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of discourse/discourse@1b2d7253e8 (2026-08-26). Data as JSON: /api/errors/c908f0a9b28f12c9. Report an issue: GitHub.