-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Willem Jan Noort
committed
Jun 16, 2024
1 parent
687108c
commit 9bf471a
Showing
15 changed files
with
252 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ on: | |
pull_request: ~ | ||
push: | ||
branches: | ||
- main | ||
- master | ||
|
||
jobs: | ||
build: | ||
|
@@ -15,7 +15,12 @@ jobs: | |
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Add git remote | ||
run: git remote add ado [email protected]:v3/adopure/adopure.nvim/adopure.nvim | ||
|
||
- name: Run tests | ||
uses: nvim-neorocks/nvim-busted-action@v1 | ||
env: | ||
AZURE_DEVOPS_EXT_PAT: ${{ secrets.AZURE_DEVOPS_EXT_PAT_ADOPURE }} | ||
with: | ||
nvim_version: ${{ matrix.neovim_version }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
describe("Load command", function() | ||
---@type StateManager|nil | ||
local state_manager | ||
local function get_secret_value() | ||
local secret = os.getenv("AZURE_DEVOPS_EXT_PAT") | ||
if secret then | ||
return secret | ||
end | ||
local handle = io.popen("pass show AZURE_DEVOPS_EXT_PAT_ADOPURE") | ||
assert(handle, "Handle not nil;") | ||
return handle:read() | ||
end | ||
|
||
setup(function() ---@diagnostic disable-line: undefined-global | ||
local secret = get_secret_value() | ||
vim.g.adopure = { pat_token = secret } | ||
end) | ||
|
||
it("can retrieve PRs", function() | ||
require("plenary.path") | ||
state_manager = require("ado").load_state_manager() | ||
assert.are.same(#state_manager.pull_requests, 1) | ||
end) | ||
|
||
it("can activate a PR", function() | ||
state_manager = require("ado").load_state_manager() | ||
state_manager:set_state_by_choice(state_manager.pull_requests[1]) | ||
|
||
assert.are.same(state_manager.state.active_pull_request.title, "Updated pr-test-file.md PR title") | ||
end) | ||
end) | ||
|
Oops, something went wrong.