# -*- mode: org -*-
* v0.4.7    2025-02-04

- Added new hook ~forge-topic-wash-title-hook~.  #735

- ~forge-rename-default-branch~ now also updates the local symref, which tracks
  the remote's HEAD.  b7ca5e76f

- Added new command ~forge-set-default-branch~.  bdbf43f36

- Added new class ~forge-forgejo-repository~ and changed the ~forge-alist~ for
  ~codeberg.org~ to use that.  0c81b44fb

- Added support for visiting blobs using a browser.  #91

- Added support for creating issues and commenting on existing issues and
  pull-requests for repositories, that are tracked in Forge's database,
  but which have not been cloned to the local machine.  #722

- It is now possible to request a review from a team.  #304

- Addressed an incompatibility between some legacy behavior in Ghub and
  ~auth-source-pass~.  You will have to change your configuration for this
  to be effective.  See the [[https://magit.vc/manual/forge/Setup-for-Gitlabcom.html][updated documentation]].  #720

- Added new commands ~forge-approve-pullreq~ and ~forge-request-changes~.  #377

- Started using the ~##~ macro and the ~partial~ shorthand from the ~llama~ package.
  247330105, b17be58bc

- Stopped depending on the ~dash~ package.  5c4a1afc8

- Sorting topics by when they were updated was not possible because the shown
  key bindings were incorrect, and if if the user figured out what the secret
  bindings were, then it would have errored.  #745

- When an unknown label, assignee or review request was encountered, then all
  entities of that type were ignored.  Now only the unknown entity is ignored.
  2e040c1d2

* v0.4.6    2025-01-01

- ~forge-read-topic-labels~ and ~forge-read-topic-marks~ failed to use the
  existing labels/marks as initial input.  #731

- The repository at point is now recognized in ~magit-repolist-mode~ buffers.
  bb4d2038f

- ~forge-dispatch~ is now bound in ~magit-repolist-mode-map~.  8bace81bc

* v0.4.5    2024-12-08

- At least Emacs 29.1 is required now.

- Started cashing calls to ~git~ during transient menu refreshes, similar
  to how such calls are cached when refreshing a Magit buffer.  #712

- Fixed parent keymap of ~forge-issues-mode-map~ and ~forge-pullreqs-mode-map~.
  9ac2afbbb

- Fixed a regression in ~forge-topics-setup-buffer~.  #725

- By default only draft pull-requests are shown in italic now.  The new
  ~forge-pullreq-draft~ face can be used to control how such pull-requests
  are shown.  Previously all topics that are marked as done were shown
  in italic.  #726

- Fixed infinite recursion in ~forge-get-issue~ and ~forge-get-pullreq~.  #704

- Fixed visiting commit in a browser.  8f9e94949

- Added new variable ~forge-bug-reference-remote-files~.  #703

* v0.4.4    2024-10-01

Thoughts and whitespace.

* v0.4.3    2024-09-04

- Fixed tracking a new repository using ~forge-pull~.  a839eaeaa

- Fixed type of ~forge--topics-spec~'s ~state~ slot.  5ee14bfbd

- Fixed several issues with ~forge--topics-list-command~.  1b4eaaedb, e94f6a37d

- When pulling API data outside a Git repository, do not try pull Git data,
  and make sure the buffer is refreshed regardless.  #695

* v0.4.2    2024-09-01

- Updated tooling.

* v0.4.1    2024-08-14

- ~forge-add-repository~ now guides the user to set ~forge.remote~ and provides
  pointers to the relevant documentation, when additional configuration is
  required, before a repository can be added to the database.  834c81492 et al.

- ~forge-add-repository~ and ~forge-pull~ used to error for repository not hosted
  on a known host or when called outside any Git repository.

- Ssh host aliases did not get resolved as intended.  #689

- In ~forge-notifications-mode~ buffers ~C-c C-c~ used to error.  7bcdffc75

- The "dwim" value displayed for ~forge.remote~ was inaccurate.  6ec5ad186

- Added new "Setup a Partially Supported Host" section to manual and fixed
  various typos.  4f6e58b4c

- Fixed inaccurate information and typos in the manual and usage messages.
  aa72a4d13 et al.

* v0.4.0    2024-08-08

This is the biggest Forge release so far, consisting of more than 650 commits
created over the course of more than two years.  I am not able to load all that
into working memory, and many parts of the code have received several rounds of
improvements, so this changelog entry uses broader strokes than usual.

- This release pays off a large amount of technical debt.  Many of the changes
  and additions below were only possible thanks to that effort, as are upcoming
  additions.

- Which topics are displayed in the current buffer can now be changed, using
  the new prefix command ~forge-topics-menu~, available on ~N m f~.  This command
  is available in any buffer that lists topics, including Magit status buffers.

  Previously topic filtering relied on dedicated commands (which listed a
  hard-coded subset in a separate buffer) and functions (which inserted a
  hard-coded subset in a separate section in the status buffer).  Most of
  these commands and functions have been removed.

  The default filters can be customized using the new
  ~forge-list-buffer-default-topic-filters~ and
  ~forge-status-buffer-default-topic-filters~ options.  If you really want to
  insert additional hard-coded sets of topics in dedicated sections in the
  status buffer, you can still define them yourself, with the help of the new
  helper function ~forge-insert-topics~.

- Dedicated buffers used to list topics now use a major mode derived from
  ~magit-mode~, instead of from ~tabulated-list-mode~.  This makes it possible to
  remove a lot of duplication (because these buffers now use the same code as
  the topic list sections, displayed in the status buffer), and makes adding
  new features more feasible.

- ~forge-dispatch~ and the newly added menu commands (such as the already
  mentioned ~transient-topics-menu~) now provide bindings to switch to any of the
  other menus.  Similarly they provide bindings to switch to list buffers.

  This should make it easy to discover the new commands, and reduces the need
  to memorize new key bindings.  It is sufficient to remember that ~N~ invokes
  ~forge-dispach~, and to then browse the other menus from there.  That being
  said, more efficient, but harder to remember, bindings are also available,
  such as:

- The new prefix command ~forge-topic-menu~, now provides the most convenient way
  to edit an existing topic.  When point is on a topic, it can be invoked using
  ~C-<return>~.  As is always the case in Magit, ~RET~ visits the thing at point in
  a separate buffer.  In the case of topics, ~C-u RET~ does both; it displays the
  buffer and the menu.

- The parts of the Github API, that one has to use when syncing the private
  topic status, are truly abysmal.  When I first created Forge, I figured that
  something so fundamentally broken would surely be fixed within a few months,
  and decided to wait until that was done.

  I was wrong, five years later nothing has changed, and I had no choice but to
  put in a lot of effort to implement workarounds, to achieve something that is
  worse than what could be trivially achieved, if the API were merely bad.

  Most frustratingly the ternary unread/pending/done is represented in API
  responses using a boolean.  That obviously puts limits on the accuracy one
  can achieve in a third-party client.  While that is the worst defect, it is
  just the tip of the iceberg.

- All the possible values for the public "state" and the private "status" of
  topics are now supported.

  The public state basically answers the question whether a topic has been
  closed yet, and if so, for what reason.  The state can be one of ~open~,
  ~completed~ and ~unplanned~ for issues, and ~open~, ~merged~ and ~rejected~ for
  pull-requests.

  The private status answers the questions whether /you/ have seen the latest
  changes yet, that someone else made to it, and when that is the case, whether
  you have additionally decided that you are "done" with that topic.

  Due to the defects of the Github API mentioned above, the distinction between
  the ~pending~ and ~done~ statuses of a topic cannot be synchronized with Github.
  So if you use both Forge and the web interface, you will sadly have to perform
  the "mark as done" action twice.

- By default Forge now lists "active" topics, i.e., topics whose public state is
  ~open~ and/or whose private status is ~unread~ or ~pending~.  In other words ~active~
  topics are those that likely still require your attention.

- At least Emacs 27.1 is required now.  Several dependencies have bumped their
  respective minimal requirement, so I had no choice in the matter, but to be
  honest, I am not unhappy about it.

- EmacSQL 4.0.0 is required now, which automatically uses the best available SQL
  backend.  The new backend, which utilizes the built-in support (added in Emacs
  29.1) is preferred.  When using an older Emacs version, or when Emacs unwisely
  was compiled without SQLite support, then a different new backend is used.
  That backend uses the C module provided by the ~sqlite3~ package, which you have
  to install explicitly.  If the module also isn't available, the legacy backend
  is used as a last resort.  That backend is less reliable and much slower than
  the newer alternatives, and is going to be removed from EmacSQL in a not so
  distant future.

- It is now possible to add repositories to the local database, without first
  cloning the respective Git repositories, using the same command used to add
  the current Git repository.  That command, ~forge-add-repository~, now also
  offers to fetch only individual topics, or all topics that were modified
  since a cut-off date of the user's choosing, instead of all topics.

- A project's topics can now be listed, visited and modified even if no local
  clone of the respective Git repository exists.  One way to navigate to such
  a project's topics is to list all repositories using ~N l r~ and then press
  ~RET~, while point is on the repository in question.

- Added new transient menu commands ~forge-topic-menu~, ~forge-topics-menu~,
  ~forge-topic-state-menu~, ~forge-topic-status-menu~, ~forge-repositories-menu~,
  ~forge-configure~, ~forge-post-dispatch~ and ~forge-notifications-menu~, and
  converted ~forge-add-repository~ to a menu command.

- Added new commands ~forge-add-some-repository~, ~forge-browse~,
  ~forge-browse-this-repository~, ~forge-browse-this-topic~,
  ~forge-checkout-this-pullreq~, ~forge-forge.graphqlItemLimit~,
  ~forge-issue-state-set-completed~, ~forge-issue-state-set-unplanned~,
  ~forge-list-global-issues~, ~forge-list-global-pullreqs~,
  ~forge-list-global-topics~, ~forge-menu-quit-list~,
  ~forge-notifications-display-all~, ~forge-notifications-display-done~,
  ~forge-notifications-display-inbox~, ~forge-notifications-display-saved~,
  ~forge-notifications-style-flat~, ~forge-notifications-style-nested~,
  ~forge-post-toggle-draft~, ~forge-pull-this-topic~,
  ~forge-pullreq-state-set-merged~, ~forge-pullreq-state-set-rejected~,
  ~forge-read-topic-lift-limit~, ~forge-refresh-buffer~,
  ~forge-rename-default-branch~, ~forge-toggle-topic-legend~,
  ~forge-edit-topic-state~, ~forge-topic-state-set-open~,
  ~forge-topic-status-set-done~, ~forge-topic-status-set-pending~,
  ~forge-topic-status-set-unread~, ~forge-topic-toggle-draft~,
  ~forge-topic-toggle-saved~, ~forge-topics-all-types~, ~forge-topics-filter-active~,
  ~forge-topics-filter-assignee~, ~forge-topics-filter-author~,
  ~forge-topics-filter-issues~, ~forge-topics-filter-labels~,
  ~forge-topics-filter-marks~, ~forge-topics-filter-milestone~,
  ~forge-topics-filter-pullreqs~, ~forge-topics-filter-reviewer~,
  ~forge-topics-filter-saved~, ~forge-topics-filter-state-completed~,
  ~forge-topics-filter-state-open~, ~forge-topics-filter-state-unplanned~,
  ~forge-topics-filter-status-done~, ~forge-topics-filter-status-inbox~,
  ~forge-topics-filter-status-pending~, ~forge-topics-filter-status-unread~,
  ~forge-topics-group~, ~forge-topics-set-limit~, ~forge-topics-set-order~,
  ~forge-topics-ungroup~, ~forge-visit-this-repository~ and ~forge-visit-this-topic~.

- Added new options ~forge-buffer-draft-p~, ~forge-limit-topic-choices~,
  ~forge-list-buffer-default-topic-filters~, ~forge-repository-list-columns~,
  ~forge-repository-list-mode-hook~, ~forge-status-buffer-default-topic-filters~
  and ~forge-topic-repository-slug-width~; and remove old options
  ~forge-database-connector~, ~forge-topic-list-mode-hook~, ~forge-topic-list-order~,
  ~forge-topic-list-limit~ and forge-pull-notifications.

- Added new faces ~forge-dimmed~, ~forge-issue-completed~, ~forge-issue-open~,
  ~forge-issue-unplanned~, ~forge-pullreq-merged~, ~forge-pullreq-open~,
  ~forge-suffix-active-and-implied~, ~forge-suffix-active~, ~forge-suffix-implied~,
  ~forge-topic-done~, ~forge-topic-header-line~, ~forge-topic-pending~,
  ~forge-topic-slug-completed~, ~forge-topic-slug-open~, ~forge-topic-slug-saved~,
  ~forge-topic-slug-unplanned~, ~forge-topic-slug-unread~ and
  ~forge-pullreq-rejected~.  Some of them are approximate replacements for the
  removed faces ~forge-topic-closed~, ~forge-topic-merged~, ~forge-topic-open~ and
  ~forge-topic-unmerged~.

- Added new Git variable ~forge.graphqlItemLimit~.  Ghub now fetches fewer items
  at once by default, but if you repeatedly get ~HTTP Error 502, "Bad gateway"~,
  when pulling API data for some repository, then limiting this to below 50
  is likely to help (but results in more requests and slows down pulling.)

- If Forge cannot access its database, it disables itself, to keep Magit usable.

- The essential function ~forge-get-repository~ has undergone several rounds of
  improvements and now much better serves the diverse needs of its callers.

- When the user has to select a topic using completion, they are initially only
  offered open topics to select from, but by pressing ~+~ the choices can be
  extended to include all topics.

Also included are many other new features, improvements and bugfixes.

* v0.3.2    2022-03-07

- The command ~forge-toggle-display-in-status-buffer~ now affects all
  relevant sections. #470

- It is possible to create a pull-request from an existing issue
  again.  #473

* v0.3.1    2022-02-16

- Added several existing commands to ~forge-dispatch~.

- Added new option ~forge-add-default-sections~, which can be set to ~nil~
  to prevent Forge from adding bindings to Magit keymaps and transient
  prefix commands.

- Added new command ~forge-browse-repository~.  #443

- Added new variable ~forge-format-avatar-function~.  #447

- Added support for the ~sqlite-builtin~ and ~sqlite-module~ backends.
  See https://github.com/skeeto/emacsql/pull/86.

- Added new option ~forge-checkout-worktree-read-directory-function~.
  #463

- Also included are many other improvements, updated documentation and
  bugfixes.

* v0.3.0    2021-10-14

- Many actions that were surprisingly slow are much faster now,
  because an embarrassing bottleneck was removed in Closql v1.2.0.

- Added new option ~forge-database-connector~ allowing the use of other
  database connector libraries beside ~emacsql-sqlite~ (currently only
  ~emacsql-libsqlite3~ (experimental) and ~emacsql-sqlite3~ (discouraged)).
  bae6a527, 21720580

- Commands that take a topic or repository as argument now expect an
  object/row ID instead of an object or a number.  Objects are not
  suitable as interactive arguments because their printed
  representation would be presented to the user when using
  ~repeat-complex-command~, and because they might not reflect the
  current state when used like that.  Numbers would be more readable
  and actually meaningful to humans, but additionally they would be
  ambiguous.  Non-interactive functions continue to expect objects
  as arguments.  #368

- Some essential key bindings that were somewhat randomly selected
  during initial development have now been changed for consistency,
  which I always intended to do, but did not get around to do until
  now.  ~forge-dispatch~ is now bound to ~N~ instead of ~'~ and Forge's
  bindings in ~magit-fetch~ and ~magit-pull~ now use ~N~ and ~n~ instead of
  ~Y~ and ~y~.  ~N~ was chosen because it was one of the last alphabetic
  keys available at the top-level in Magit.  8c9614e3 et al.

- Added new command ~forge-merge~ for merging pull-requests using the
  forge's API, which I recommend you only use if someone forces you
  to do use the API.  3112aded

- Added support for following the links that some projects on Github
  display alongside issue templates.  46d5f253

- Setting the new Git variable ~forge.autoPull~ to false disables
  pulling Git data whenever API data is fetched.  This may be useful
  in active mono-repos where there is always something new (but likely
  irrelevant) to pull.  #362

- Added new commands ~forge-list-labeled-pullreqs~ and
  ~forge-list-labeled-issues~.  a3e6f8aa

- Starting with Emacs 28 ~bug-references~ is automatically configure for
  repositories cloned from many Git forges, so Forge no longer has to
  do it.  #283, #412

- It is possible to fetch only select topics of a repository, which is
  useful if that happens to be large and/or if you are only interested
  in a select few topics (such as the one you are about to open).
  ~forge-pull~ learned to fetch information about the repository itself
  even when configured to only fetch certain topics.  #382

- Added the ~forge-browse-*~ commands to ~forge-dispatch~.  #422

- Also included are several other improvements, updated documentation
  and bugfixes.

* v0.2.1    2021-06-17

- Adjusted to breaking changes in EIEIO in Emacs 28.

* v0.2.0    2021-05-25

- Second release.

- Features and bugfixes.

- I haven't been keeping this list updated and don't feel like going
  through hundreds of commits now.  Sorry, maybe next time.

* v0.1.0    2018-12-19

- Initial beta release.
