1. 21 4月, 2021 1 次提交
  2. 15 4月, 2021 5 次提交
  3. 14 4月, 2021 11 次提交
    • T
      Merge branch '212-poll-only-in-active-window' into 'main' · 11bcd7ca
      Tomas Vik 提交于
      feat: only poll for new status bar information in focused window
      
      See merge request gitlab-org/gitlab-vscode-extension!227
      11bcd7ca
    • T
      fix(status bar): hide all status items when there is no GitLab project · 6a5537ee
      Tomas Vik 提交于
      During the refactoring, we had to disable one test that hid the MR
      status bar item when there wasn't any project. This commit fixes the
      scenario by checking whether a GitLab project can be fetched for the
      current workspace and if not, we hide all the status bar items. This
      also happens to fix the #71.
      6a5537ee
    • T
      refactor: inline the status bar item "initialization" methods · 3560344e
      Tomas Vik 提交于
      The "init" keyword wasn't accurate anymore. We were simply creating the
      StatusBarItems and it made more sense to inline the creating so the
      reader instantly knows what's happening.
      3560344e
    • T
      refactor: refresh status bar only with workspace folder present · bdafa7aa
      Tomas Vik 提交于
      When there is no workspace folder, we will skip refreshing all together.
      This scenario can occur when user didn't open a project, or they use
      multi-root project and don't have a file open in the editor.
      bdafa7aa
    • T
      105afe90
    • T
      refactor: fetch pipeline, mr, and issue in the same method · 9e2478ae
      Tomas Vik 提交于
      This commit changes the `refreshPipelineAndMr` method to refresh all
      status bar items. Instead of using the class properties to communicate
      between methods, we are passing values to the `updateMrItem` and
      `fetchMrClosingIssue`. This makes the code easier to reason about
      because there is fewer side-effects
      9e2478ae
    • T
      refactor: unite refreshing pipeline and mr · 0321dfa6
      Tomas Vik 提交于
      This was a great win. We already had to fetch the MR anyway in the
      `refreshPipeline` method, this commit reduces the `fetchBranchMR` method
      to a simple presentation layer, saving us one or more API calls.
      0321dfa6
    • T
      refactor: separate methods for fetching MR and closing issue · 1a0ee269
      Tomas Vik 提交于
      We separate methods for fetching the MR and closing issue so we can
      later significantly reduce the MR fetching method.
      
      This is best demonstrated by the following snippet from this commit:
      
      ```diff
      - this.fetchBranchMrAndClosingIssue();
      + await this.fetchBranchMR();
      + await this.fetchMRIssues();
      ```
      1a0ee269
    • T
      refactor: simplify closing issue item · 002b2c6e
      Tomas Vik 提交于
      Instead of registering a new command, which was basically a callback, we
      can declare what the item is supposed to do instead, reducing the amount
      of procedural code.
      
      Instead of triggering always one command which will decide what to do,
      we can decide what to do at the time when we change the status bar item.
      002b2c6e
    • T
      refactor: simplify MR status item command · c87e9c9a
      Tomas Vik 提交于
      Instead of registering a new command, which was basically a callback, we
      can declare what the item is supposed to do instead, reducing the amount
      of procedural code.
      
      Instead of triggering always one command which will decide what to do,
      we can decide what to do at the time when we change the status bar item.
      c87e9c9a
    • T
      refactor: reorder status bar items · 6daaff42
      Tomas Vik 提交于
      The current order is:
      1. Pipeline
      2. Closing issue
      3. MR
      
      But logically it must be a different order:
      
      1. Pipeline - pipeline is the most common out of the three
      2. MR - some branches have an MR
      3. Closing issue - can only exist if there is an open MR
      6daaff42
  4. 13 4月, 2021 1 次提交
  5. 12 4月, 2021 9 次提交
  6. 09 4月, 2021 6 次提交
  7. 08 4月, 2021 4 次提交
  8. 07 4月, 2021 3 次提交