Keep track of when hotfixes can be removed

Blocked.by

  • Compile-time macro.
  • Prints a warning when issue is closed.
  • Works both for your own and for other repositories

 

defmodule Example do
  require Blocked

  def main do
    IO.puts("Any code here")
    
    Blocked.by("#42", "This code can be removed when the issue is closed") do
      hacky_workaround()
    end
    
    IO.puts("Any code here")
  end
end
defmodule Example do
  require Blocked

  def main do
    IO.puts("Any code here")
    
    # The reason is optional
    Blocked.by("#69") do
      a_quick_fix()
    end
    
    IO.puts("Any code here")
  end
end
defmodule Example do
  require Blocked

  def main do
    IO.puts("Any code here")
    
    # It is possible to indicate
    # the desired 'ideal' code as well, by passing an `else` block:
    Blocked.by("#1337") do
      ugly_fallback()
    else
      beautiful_progress()
    end
    
    IO.puts("Any code here")
  end
end
defmodule Example do
  require Blocked
  
  # If the blockage is more general, you can also leave out the `do` block.
  Blocked.by("#65535", """
  This whole module can be rewritten 
  once we're on the new Elixir version!
  """)

  def a_fun do
    42
  end
  
  def other_fun do
    "The game"
  end
end
# Blocked supports many ways of referring to an issue:

# Your repo:
Blocked.by("#13")

# Other repo from you/your organization
Blocked.by("elixir#13")
Blocked.by("elixir/13")

# Any other repo:
Blocked.by("elixir-lang/elixir#13")
Blocked.by("elixir-lang/elixir/13")
Blocked.by("https://github.com/elixir-lang/elixir/issues/13")

More Features

  • Fully Configurable
    • By default only runs in CI
    • By default detects organization+repo names from local git info

Roadmap

  • Squashing bugs -> stable release
  • Maybe support for GitLab, Bitbucket, etc?

Keep track of when hotfixes can be removed

Made with Slides.com