<commit_before>GitHubFile  = require './github-file'

module.exports =
  activate: ->
    return unless atom.project.getRepo()?

    atom.workspaceView.eachPane (pane) ->
      pane.command 'github:file', ->
        if itemPath = getActivePath()
          GitHubFile.fromPath(itemPath).open()

      pane.command 'github:blame', ->
        if itemPath = getActivePath()
          GitHubFile.fromPath(itemPath).blame()

      pane.command 'github:history', ->
        if itemPath = getActivePath()
          GitHubFile.fromPath(itemPath).history()

      pane.command 'github:copy-url', ->
        if itemPath = getActivePath()
          GitHubFile.fromPath(itemPath).copyUrl(getSelectedRange())

getActivePath = ->
  atom.workspaceView.getActivePaneItem()?.getPath?()

getSelectedRange = ->
  atom.workspaceView.getActivePaneItem()?.getSelectedBufferRange?()<commit_msg>Rename commands in package main<commit_after>GitHubFile  = require './github-file'

module.exports =
  activate: ->
    return unless atom.project.getRepo()?

    atom.workspaceView.eachPane (pane) ->
      pane.command 'open-on-github:file', ->
        if itemPath = getActivePath()
          GitHubFile.fromPath(itemPath).open()

      pane.command 'open-on-github:blame', ->
        if itemPath = getActivePath()
          GitHubFile.fromPath(itemPath).blame()

      pane.command 'open-on-github:history', ->
        if itemPath = getActivePath()
          GitHubFile.fromPath(itemPath).history()

      pane.command 'open-on-github:copy-url', ->
        if itemPath = getActivePath()
          GitHubFile.fromPath(itemPath).copyUrl(getSelectedRange())

getActivePath = ->
  atom.workspaceView.getActivePaneItem()?.getPath?()

getSelectedRange = ->
  atom.workspaceView.getActivePaneItem()?.getSelectedBufferRange?()
{'fraction_non_alphanumeric': 0.1340782122905028, 'fraction_numerical': 0.0, 'mean_word_length': 3.2141176470588237, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7525432', 'n_tokens_mistral': 556, 'n_tokens_neox': 547, 'n_words': 79}