-
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.
feat: add support for cloud installations (#24)
Co-authored-by: Dhruv Thakur <[email protected]>
- Loading branch information
Showing
18 changed files
with
265 additions
and
84 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: e2e-tests | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
pull_request: | ||
paths: | ||
- "go.*" | ||
- "**/*.go" | ||
- ".github/workflows/*.yml" | ||
|
||
env: | ||
GO_VERSION: '1.23.3' | ||
|
||
jobs: | ||
test: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
- name: Install | ||
run: go install . | ||
- name: Run tests | ||
run: | | ||
cd tests | ||
./test.sh |
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 |
---|---|---|
|
@@ -9,7 +9,7 @@ | |
<img src="https://tools.dhruvs.space/images/punchout/punchout.gif" alt="Usage" /> | ||
</p> | ||
|
||
💾 Install | ||
💾 Installation | ||
--- | ||
|
||
**homebrew**: | ||
|
@@ -33,44 +33,55 @@ file. | |
### Using a config file | ||
|
||
Create a toml file that looks like the following. The default location for this | ||
file is `~/.config/punchout/punchout.toml`. | ||
file is `~/.config/punchout/punchout.toml`. The configuration needed for | ||
authenticating against your JIRA installation (on-premise or cloud) will depend | ||
on the kind of the installation. | ||
|
||
```toml | ||
[jira] | ||
jira_url = "https://jira.company.com" | ||
jira_token = "XXX" | ||
|
||
# for on-premise installations | ||
installation_type = "onpremise" | ||
jira_token = "your personal access token" | ||
|
||
# for cloud installations | ||
installation_type = "cloud" | ||
jira_token = "your API token" | ||
jira_username = "[email protected]" | ||
|
||
# put whatever JQL you want to query for | ||
jql = "assignee = currentUser() AND updatedDate >= -14d ORDER BY updatedDate DESC" | ||
|
||
# I don't know how many people will find use for this. | ||
# I need this, since the JIRA server I use runs 5 hours behind | ||
# I need this, since the JIRA on-premise server I use runs 5 hours behind | ||
# the actual time, for whatever reason 🤷 | ||
jira_time_delta_mins = 300 | ||
``` | ||
|
||
*Note: `punchout` only supports [on-premise] installations of JIRA for now. I | ||
might add support for cloud installations in the future.* | ||
|
||
### Using command line flags | ||
|
||
Use `punchout -h` for help. | ||
|
||
```bash | ||
punchout \ | ||
db-path='/path/to/punchout/db/file.db' \ | ||
jira-url='https://jira.company.com' \ | ||
jira-token='XXX' \ | ||
jql='assignee = currentUser() AND updatedDate >= -14d ORDER BY updatedDate DESC' \ | ||
jira-time-delta-mins='300' \ | ||
-db-path='/path/to/punchout/db/file.db' \ | ||
-jira-url='https://jira.company.com' \ | ||
-jira-installation-type 'cloud' \ | ||
-jira-token='XXX' \ | ||
-jira-username='[email protected]' \ | ||
-jql='assignee = currentUser() AND updatedDate >= -14d ORDER BY updatedDate DESC' \ | ||
-jira-time-delta-mins='300' | ||
``` | ||
|
||
Both the config file and the command line flags can be used in conjunction, but | ||
the latter will take precedence over the former. | ||
|
||
```bash | ||
punchout \ | ||
config-file-path='/path/to/punchout/config/file.toml' \ | ||
jira-token='XXX' \ | ||
jql='assignee = currentUser() AND updatedDate >= -14d ORDER BY updatedDate DESC' | ||
-config-file-path='/path/to/punchout/config/file.toml' \ | ||
-jira-token='XXX' \ | ||
-jql='assignee = currentUser() AND updatedDate >= -14d ORDER BY updatedDate DESC' | ||
``` | ||
|
||
🖥️ Screenshots | ||
|
@@ -114,8 +125,8 @@ General | |
General List Controls | ||
h/<Up> Move cursor up | ||
k/<Down> Move cursor down | ||
k/<Up> Move cursor up | ||
j/<Down> Move cursor down | ||
h<Left> Go to previous page | ||
l<Right> Go to next page | ||
/ Start filtering | ||
|
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
Oops, something went wrong.