zulip-terminal icon indicating copy to clipboard operation
zulip-terminal copied to clipboard

Migrate internal code to use Direct Message terminology

Open Ajnus opened this issue 1 year ago • 6 comments
trafficstars

What does this PR do, and why?

Replaces instances of: private, privates, _ private, private _, PRIVATE, PRIVATES, Private , pm, pms, _ pm, pm _, PM, Pm (and derivatives, e.g: _is_private_message_to_self, private_msg_ids, private_msg_ids_by_user_ids, (...))

to Direct Message terminology, avoiding the test_model.py, model.py files, strings and other instances related to the API, for API consistency reasons, while "exploring other parts", such as replacing comments.

This PR consists of the - on-chat debated - first part of altering just internal code, not the second that focus on API related code.

External discussion & connections

  • [x] Discussed in #zulip-terminal in #T1344 Migrate internal code to use Direct Message terminology
  • [x] Fully fixes #1344
  • [] Partially fixes issue #
  • [x] Builds upon previous unmerged work in PR #1344
  • [ ] Is a follow-up to work in PR #
  • [ ] Requires merge of PR #
  • [ ] Merge will enable work on #

How did you test this?

  • [ ] Manually - Behavioral changes
  • [ ] Manually - Visual changes
  • [ ] Adapting existing automated tests
  • [ ] Adding automated tests for new behavior (or missing tests)
  • [ ] Existing automated tests should already cover this (only a refactor of tested code)
  • [x] It runs image

Self-review checklist for each commit

  • [x] It is a minimal coherent idea
  • [ ] It has a commit summary following the documented style (title & body)
  • [ ] It has a commit summary describing the motivation and reasoning for the change
  • [ ] It individually passes linting and tests
  • [ ] It contains test additions for any new behavior
  • [ ] It flows clearly from a previous branch commit, and/or prepares for the next commit

Ajnus avatar Oct 28 '24 16:10 Ajnus

@Ajnus Just a quick note re testing in general - these can all be run locally, as per the development notes in the README. In particular there is tools/check-branch, for the isolated commit check itself.

neiljp avatar Oct 30 '24 19:10 neiljp

Hello @Ajnus, it seems like you have referenced #1344 in your pull request description, but you have not referenced them in your commit message description(s). Referencing an issue in a commit message automatically closes the corresponding issue when the commit is merged, which makes the issue tracker easier to manage.

Please run git commit --amend in your command line client to amend your commit message description with Fixes #1344..

An example of a correctly-formatted commit:

commit fabd5e450374c8dde65ec35f02140383940fe146
Author: zulipbot
Date:   Sat Mar 18 13:42:40 2017 -0700

    pull requests: Check PR commits reference when issue is referenced.

    Fixes #51.

To learn how to write a great commit message, please refer to our guide.

zulipbot avatar Nov 05 '24 18:11 zulipbot

Hello @Ajnus, it seems like you have referenced #1344 in your pull request description, but you have not referenced them in your commit message description(s). Referencing an issue in a commit message automatically closes the corresponding issue when the commit is merged, which makes the issue tracker easier to manage.

Please run git commit --amend in your command line client to amend your commit message description with Fixes #1344..

An example of a correctly-formatted commit:

commit fabd5e450374c8dde65ec35f02140383940fe146
Author: zulipbot
Date:   Sat Mar 18 13:42:40 2017 -0700

    pull requests: Check PR commits reference when issue is referenced.

    Fixes #51.

To learn how to write a great commit message, please refer to our guide.

Doesn't this breaks @github-actions Linting & tests / Lint - Commit text format (gitlint) (pull_request) ?

Ajnus avatar Nov 05 '24 20:11 Ajnus

@Ajnus Just a quick note re testing in general - these can all be run locally, as per the development notes in the README. In particular there is tools/check-branch, for the isolated commit check itself.

Can't really. Even after make test

Captura de tela de 2024-11-05 17-55-20

Ajnus avatar Nov 05 '24 20:11 Ajnus

@Ajnus the commit history needs to be cleaned up before this will be ready for review. Check out our GitHub guide and commit guidelines for more details.

timabbott avatar Nov 07 '24 19:11 timabbott

@timabbott check the zulip chat please.

Ajnus avatar Nov 07 '24 19:11 Ajnus