Replacing Phabricator Herald rules

Replacing Phabricator Herald rules

If you never heard of Phabricator, you might not be alone. I admit I only started to hear about it recently, while the project started in 2010.

Phabricator is essentially a forge, a suite of web-based developments collaborators tools, including multiple tools to do code reviews, track bugs or browse a repository. It has a notable list of users, such as AngularJS, Asana, Facebook (the original author of the project), FreeBSD, Twitter, and even Uber.

However, it turns out you might not hear more about Phabricator in the future as the project has been discontinued in June 2021. 😢

There's now three options for Phabricator users: move to a different platform, stick to their unmaintained Phabricator instance, or switch to Phorge, a community-driven fork of the original project.

If you pick one of the two last options, we won't be much help. However, if you decide to move to another platform, and if that platform is GitHub, this blog post might be handy. ✋

What is Herald?

If you used Phabricator, you know about this. Herald is a system inside Phabricator that allows anyone to create rules that automate part of your workflow. This covers multiple use cases and became quite handy for engineering teams.

For example, you could:

  • Add a comment automatically if the status of a task matches;
  • Assign a task automatically if a description matches;
  • Modify a task automatically if a date matches;
  • etc.
Herald rules editor

This kind of automation is a time saver for developers and allows them to focus on other tasks.

Herald Alternative

Now, if you are moving away from Phabricator, you might be wondering how you could have these kinds of rules on your new platform. We don't have a solution to offer for every platform, though we have a good idea of how you can achieve this on GitHub for pull requests.

It turns out Mergify automation solution really looks like Herald. It uses the same mechanism where matching the conditions triggers actions — it even shares the same nomenclature!

For example, you could write an automatic labeling rule like this:

- name: automatic add a security label if some files are modified
  conditions:
    # Matches all files in the "sensitive" directory
    - files~=^sensitive/
  actions:
    label:
      add:
        - security

Or even a rule to automatically assign a pull request to somebody:

- name: automatic assign the PR to jd for backend if title contains "database"
  conditions:
    # Matches all files in the "backend" directory
    - files~=^backend/
    # Title must contains database
    - title~=database
  actions:
    assign:
      add_users:
        - jd

The possibilities are quite infinite as Mergify supports tons of attributes to match. There is arguably more scenario that is covered here than what Herald could have done, though Mergify only handles this on pull requests.

This however only covers one tiny part of the tools Phabricator provided. If you have good stories about Phabricator migration, please share tips and hints in the comment section below.

Ready to automate your GitHub workflow?
We save your time by prioritizing and automatically merging, commenting, rebasing, updating, labeling, backporting, closing, assigning, your pull requests.