bitbucket-jira-cli 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (144) hide show
  1. bitbucket_jira_cli-1.0.0/.dockerignore +18 -0
  2. bitbucket_jira_cli-1.0.0/.github/FUNDING.yml +3 -0
  3. bitbucket_jira_cli-1.0.0/.github/ISSUE_TEMPLATE/1_bug_report.yaml +83 -0
  4. bitbucket_jira_cli-1.0.0/.github/ISSUE_TEMPLATE/2_feature_request.yaml +56 -0
  5. bitbucket_jira_cli-1.0.0/.github/ISSUE_TEMPLATE/3_question.yaml +38 -0
  6. bitbucket_jira_cli-1.0.0/.github/ISSUE_TEMPLATE/config.yml +5 -0
  7. bitbucket_jira_cli-1.0.0/.github/PULL_REQUEST_TEMPLATE.md +15 -0
  8. bitbucket_jira_cli-1.0.0/.github/dependabot.yml +10 -0
  9. bitbucket_jira_cli-1.0.0/.github/workflows/docker-build.yml +51 -0
  10. bitbucket_jira_cli-1.0.0/.github/workflows/docker-publish.yml +86 -0
  11. bitbucket_jira_cli-1.0.0/.github/workflows/docs.yml +66 -0
  12. bitbucket_jira_cli-1.0.0/.github/workflows/python-build.yml +58 -0
  13. bitbucket_jira_cli-1.0.0/.github/workflows/python-publish.yml +66 -0
  14. bitbucket_jira_cli-1.0.0/.github/workflows/release.yml +109 -0
  15. bitbucket_jira_cli-1.0.0/.gitignore +151 -0
  16. bitbucket_jira_cli-1.0.0/.python-version +1 -0
  17. bitbucket_jira_cli-1.0.0/.vscode/extensions.json +14 -0
  18. bitbucket_jira_cli-1.0.0/.vscode/launch.json +74 -0
  19. bitbucket_jira_cli-1.0.0/.vscode/settings.json +53 -0
  20. bitbucket_jira_cli-1.0.0/.vscode/tasks.json +4 -0
  21. bitbucket_jira_cli-1.0.0/CONTRIBUTING.md +291 -0
  22. bitbucket_jira_cli-1.0.0/Dockerfile +54 -0
  23. bitbucket_jira_cli-1.0.0/LICENSE +21 -0
  24. bitbucket_jira_cli-1.0.0/PKG-INFO +106 -0
  25. bitbucket_jira_cli-1.0.0/README.md +82 -0
  26. bitbucket_jira_cli-1.0.0/bitbucket_jira_cli/__init__.py +9 -0
  27. bitbucket_jira_cli-1.0.0/bitbucket_jira_cli/_async.py +17 -0
  28. bitbucket_jira_cli-1.0.0/bitbucket_jira_cli/api/__init__.py +1 -0
  29. bitbucket_jira_cli-1.0.0/bitbucket_jira_cli/api/adf.py +45 -0
  30. bitbucket_jira_cli-1.0.0/bitbucket_jira_cli/api/base.py +88 -0
  31. bitbucket_jira_cli-1.0.0/bitbucket_jira_cli/api/bitbucket.py +304 -0
  32. bitbucket_jira_cli-1.0.0/bitbucket_jira_cli/api/jira.py +147 -0
  33. bitbucket_jira_cli-1.0.0/bitbucket_jira_cli/auth/__init__.py +1 -0
  34. bitbucket_jira_cli-1.0.0/bitbucket_jira_cli/auth/commands.py +366 -0
  35. bitbucket_jira_cli-1.0.0/bitbucket_jira_cli/auth/store.py +97 -0
  36. bitbucket_jira_cli-1.0.0/bitbucket_jira_cli/commands/__init__.py +1 -0
  37. bitbucket_jira_cli-1.0.0/bitbucket_jira_cli/commands/_common.py +65 -0
  38. bitbucket_jira_cli-1.0.0/bitbucket_jira_cli/commands/issue.py +410 -0
  39. bitbucket_jira_cli-1.0.0/bitbucket_jira_cli/commands/misc.py +111 -0
  40. bitbucket_jira_cli-1.0.0/bitbucket_jira_cli/commands/pipeline.py +180 -0
  41. bitbucket_jira_cli-1.0.0/bitbucket_jira_cli/commands/pr.py +817 -0
  42. bitbucket_jira_cli-1.0.0/bitbucket_jira_cli/commands/repo.py +144 -0
  43. bitbucket_jira_cli-1.0.0/bitbucket_jira_cli/config.py +95 -0
  44. bitbucket_jira_cli-1.0.0/bitbucket_jira_cli/context.py +70 -0
  45. bitbucket_jira_cli-1.0.0/bitbucket_jira_cli/errors.py +33 -0
  46. bitbucket_jira_cli-1.0.0/bitbucket_jira_cli/git.py +126 -0
  47. bitbucket_jira_cli-1.0.0/bitbucket_jira_cli/gitauth.py +63 -0
  48. bitbucket_jira_cli-1.0.0/bitbucket_jira_cli/interaction.py +121 -0
  49. bitbucket_jira_cli-1.0.0/bitbucket_jira_cli/jira_fields.py +86 -0
  50. bitbucket_jira_cli-1.0.0/bitbucket_jira_cli/jira_ops.py +37 -0
  51. bitbucket_jira_cli-1.0.0/bitbucket_jira_cli/main.py +67 -0
  52. bitbucket_jira_cli-1.0.0/bitbucket_jira_cli/render.py +273 -0
  53. bitbucket_jira_cli-1.0.0/bitbucket_jira_cli/timefmt.py +42 -0
  54. bitbucket_jira_cli-1.0.0/bitbucket_jira_cli/ui.py +26 -0
  55. bitbucket_jira_cli-1.0.0/docs/contributing.md +20 -0
  56. bitbucket_jira_cli-1.0.0/docs/guides/branch-key.md +63 -0
  57. bitbucket_jira_cli-1.0.0/docs/guides/configuration.md +100 -0
  58. bitbucket_jira_cli-1.0.0/docs/guides/environment.md +35 -0
  59. bitbucket_jira_cli-1.0.0/docs/guides/exit-codes.md +20 -0
  60. bitbucket_jira_cli-1.0.0/docs/guides/formatting.md +44 -0
  61. bitbucket_jira_cli-1.0.0/docs/installation.md +58 -0
  62. bitbucket_jira_cli-1.0.0/docs/intro.md +22 -0
  63. bitbucket_jira_cli-1.0.0/docs/reference/_category_.json +8 -0
  64. bitbucket_jira_cli-1.0.0/docs/reference/api.md +45 -0
  65. bitbucket_jira_cli-1.0.0/docs/reference/auth/_category_.json +8 -0
  66. bitbucket_jira_cli-1.0.0/docs/reference/auth/index.md +31 -0
  67. bitbucket_jira_cli-1.0.0/docs/reference/auth/login.md +37 -0
  68. bitbucket_jira_cli-1.0.0/docs/reference/auth/logout.md +25 -0
  69. bitbucket_jira_cli-1.0.0/docs/reference/auth/status.md +24 -0
  70. bitbucket_jira_cli-1.0.0/docs/reference/auth/token.md +24 -0
  71. bitbucket_jira_cli-1.0.0/docs/reference/browse.md +43 -0
  72. bitbucket_jira_cli-1.0.0/docs/reference/index.md +48 -0
  73. bitbucket_jira_cli-1.0.0/docs/reference/issue/_category_.json +8 -0
  74. bitbucket_jira_cli-1.0.0/docs/reference/issue/close.md +30 -0
  75. bitbucket_jira_cli-1.0.0/docs/reference/issue/comment.md +31 -0
  76. bitbucket_jira_cli-1.0.0/docs/reference/issue/create.md +39 -0
  77. bitbucket_jira_cli-1.0.0/docs/reference/issue/edit.md +36 -0
  78. bitbucket_jira_cli-1.0.0/docs/reference/issue/fields.md +31 -0
  79. bitbucket_jira_cli-1.0.0/docs/reference/issue/index.md +31 -0
  80. bitbucket_jira_cli-1.0.0/docs/reference/issue/list.md +39 -0
  81. bitbucket_jira_cli-1.0.0/docs/reference/issue/transition.md +34 -0
  82. bitbucket_jira_cli-1.0.0/docs/reference/issue/view.md +44 -0
  83. bitbucket_jira_cli-1.0.0/docs/reference/pipeline/_category_.json +8 -0
  84. bitbucket_jira_cli-1.0.0/docs/reference/pipeline/index.md +28 -0
  85. bitbucket_jira_cli-1.0.0/docs/reference/pipeline/list.md +27 -0
  86. bitbucket_jira_cli-1.0.0/docs/reference/pipeline/logs.md +38 -0
  87. bitbucket_jira_cli-1.0.0/docs/reference/pipeline/run.md +35 -0
  88. bitbucket_jira_cli-1.0.0/docs/reference/pipeline/stop.md +31 -0
  89. bitbucket_jira_cli-1.0.0/docs/reference/pipeline/view.md +32 -0
  90. bitbucket_jira_cli-1.0.0/docs/reference/pr/_category_.json +8 -0
  91. bitbucket_jira_cli-1.0.0/docs/reference/pr/checkout.md +30 -0
  92. bitbucket_jira_cli-1.0.0/docs/reference/pr/close.md +31 -0
  93. bitbucket_jira_cli-1.0.0/docs/reference/pr/comment.md +40 -0
  94. bitbucket_jira_cli-1.0.0/docs/reference/pr/create.md +53 -0
  95. bitbucket_jira_cli-1.0.0/docs/reference/pr/diff.md +31 -0
  96. bitbucket_jira_cli-1.0.0/docs/reference/pr/edit.md +37 -0
  97. bitbucket_jira_cli-1.0.0/docs/reference/pr/index.md +35 -0
  98. bitbucket_jira_cli-1.0.0/docs/reference/pr/list.md +38 -0
  99. bitbucket_jira_cli-1.0.0/docs/reference/pr/merge.md +51 -0
  100. bitbucket_jira_cli-1.0.0/docs/reference/pr/review.md +33 -0
  101. bitbucket_jira_cli-1.0.0/docs/reference/pr/status.md +26 -0
  102. bitbucket_jira_cli-1.0.0/docs/reference/pr/task.md +18 -0
  103. bitbucket_jira_cli-1.0.0/docs/reference/pr/view.md +43 -0
  104. bitbucket_jira_cli-1.0.0/docs/reference/repo/_category_.json +8 -0
  105. bitbucket_jira_cli-1.0.0/docs/reference/repo/clone.md +37 -0
  106. bitbucket_jira_cli-1.0.0/docs/reference/repo/index.md +27 -0
  107. bitbucket_jira_cli-1.0.0/docs/reference/repo/list.md +33 -0
  108. bitbucket_jira_cli-1.0.0/docs/reference/repo/set-default.md +24 -0
  109. bitbucket_jira_cli-1.0.0/docs/reference/repo/view.md +32 -0
  110. bitbucket_jira_cli-1.0.0/docs/research/prior-art.md +213 -0
  111. bitbucket_jira_cli-1.0.0/docs/research/tui-review.md +66 -0
  112. bitbucket_jira_cli-1.0.0/docs/usage.md +37 -0
  113. bitbucket_jira_cli-1.0.0/docusaurus.config.ts +238 -0
  114. bitbucket_jira_cli-1.0.0/package-lock.json +18971 -0
  115. bitbucket_jira_cli-1.0.0/package.json +49 -0
  116. bitbucket_jira_cli-1.0.0/pyproject.toml +181 -0
  117. bitbucket_jira_cli-1.0.0/scripts/build-versions.mjs +105 -0
  118. bitbucket_jira_cli-1.0.0/scripts/bump-docs-version.sh +56 -0
  119. bitbucket_jira_cli-1.0.0/scripts/gen_cli_docs.py +358 -0
  120. bitbucket_jira_cli-1.0.0/sidebars.ts +31 -0
  121. bitbucket_jira_cli-1.0.0/src/components/HomepageFeatures/index.tsx +108 -0
  122. bitbucket_jira_cli-1.0.0/src/components/HomepageFeatures/styles.module.css +25 -0
  123. bitbucket_jira_cli-1.0.0/src/components/quickstart/index.tsx +83 -0
  124. bitbucket_jira_cli-1.0.0/src/css/custom.css +245 -0
  125. bitbucket_jira_cli-1.0.0/src/pages/index.module.css +55 -0
  126. bitbucket_jira_cli-1.0.0/src/pages/index.tsx +132 -0
  127. bitbucket_jira_cli-1.0.0/static/img/android-chrome-192x192.png +0 -0
  128. bitbucket_jira_cli-1.0.0/static/img/android-chrome-512x512.png +0 -0
  129. bitbucket_jira_cli-1.0.0/static/img/apple-touch-icon.png +0 -0
  130. bitbucket_jira_cli-1.0.0/static/img/banner.png +0 -0
  131. bitbucket_jira_cli-1.0.0/static/img/favicon-16x16.png +0 -0
  132. bitbucket_jira_cli-1.0.0/static/img/favicon-32x32.png +0 -0
  133. bitbucket_jira_cli-1.0.0/static/img/favicon.ico +0 -0
  134. bitbucket_jira_cli-1.0.0/static/img/favicon.svg +10 -0
  135. bitbucket_jira_cli-1.0.0/static/img/site.webmanifest +11 -0
  136. bitbucket_jira_cli-1.0.0/tests/test_adf.py +29 -0
  137. bitbucket_jira_cli-1.0.0/tests/test_cli.py +28 -0
  138. bitbucket_jira_cli-1.0.0/tests/test_context.py +32 -0
  139. bitbucket_jira_cli-1.0.0/tests/test_git.py +47 -0
  140. bitbucket_jira_cli-1.0.0/tests/test_gitauth.py +32 -0
  141. bitbucket_jira_cli-1.0.0/tests/test_interaction.py +30 -0
  142. bitbucket_jira_cli-1.0.0/tests/test_timefmt.py +37 -0
  143. bitbucket_jira_cli-1.0.0/tsconfig.json +7 -0
  144. bitbucket_jira_cli-1.0.0/uv.lock +898 -0
@@ -0,0 +1,18 @@
1
+ .git
2
+ .github
3
+ .claude
4
+ .venv
5
+ dist
6
+ build
7
+ *.egg-info
8
+ __pycache__
9
+ .pytest_cache
10
+ .ruff_cache
11
+ .mypy_cache
12
+ node_modules
13
+ tests
14
+ scratch
15
+ .vscode
16
+ .idea
17
+ *.log
18
+ .DS_Store
@@ -0,0 +1,3 @@
1
+ # These are supported funding model platforms
2
+
3
+ github: Spenhouet
@@ -0,0 +1,83 @@
1
+ name: Bug report
2
+ description: Report an error or unexpected behavior
3
+ labels: ["bug"]
4
+ body:
5
+ - type: markdown
6
+ attributes:
7
+ value: |
8
+ Thank you for taking the time to report an issue! We're glad to have you involved with bitbucket-jira-cli.
9
+
10
+ **Before reporting, please make sure to search through [existing issues](https://github.com/Spenhouet/bitbucket-jira-cli/issues?q=is:issue+is:open+label:bug) (including [closed](https://github.com/Spenhouet/bitbucket-jira-cli/issues?q=is:issue%20state:closed%20label:bug)).**
11
+
12
+ - type: markdown
13
+ attributes:
14
+ value: |
15
+ ### Diagnostic info
16
+ Run `bj bugreport` and paste the full output in the **Diagnostic info** field below.
17
+ This command prints your version, system details, and configuration — with all secrets automatically redacted.
18
+
19
+ - type: textarea
20
+ attributes:
21
+ label: Description
22
+ description: |
23
+ A clear and concise description of the bug, including a minimal reproducible example.
24
+
25
+ Be sure to include the command you invoked (e.g., `bj pr create`).
26
+ validations:
27
+ required: true
28
+
29
+ - type: textarea
30
+ attributes:
31
+ label: Diagnostic info
32
+ description: |
33
+ Paste the output of `bj bugreport` here.
34
+ This includes your version, Python/OS info, and configuration with secrets redacted.
35
+ placeholder: |
36
+ ## Bug Report Diagnostic Info
37
+
38
+ ### Version
39
+ bitbucket-jira-cli x.y.z
40
+
41
+ ### System
42
+ Python: ...
43
+ Platform: ...
44
+ Architecture: ...
45
+
46
+ ### Config
47
+ Config file: ...
48
+ ```yaml
49
+ ...
50
+ ```
51
+ render: markdown
52
+ validations:
53
+ required: false
54
+
55
+ - type: input
56
+ attributes:
57
+ label: Version
58
+ description: |
59
+ What version of bitbucket-jira-cli are you using?
60
+ (Already included in `bj bugreport` output — fill in here only if you didn't run that command.)
61
+ placeholder: e.g., bitbucket-jira-cli 4.0.3
62
+ validations:
63
+ required: false
64
+
65
+ - type: input
66
+ attributes:
67
+ label: Bitbucket Version
68
+ description: |
69
+ What Bitbucket product are you using? Bitbucket Cloud or Server/Data Center.
70
+ Example: `Bitbucket Cloud` or `Bitbucket Server 8.9`
71
+ placeholder: e.g., Bitbucket Cloud or Bitbucket Server 8.9
72
+ validations:
73
+ required: false
74
+
75
+ - type: input
76
+ attributes:
77
+ label: Jira Version
78
+ description: |
79
+ What Jira version are you using (or not)? Include whether it's Cloud or Server/Data Center.
80
+ Example: `Jira Cloud` or `Jira Server 8.20.5`
81
+ placeholder: e.g., Jira Cloud or Jira Server 8.20.5
82
+ validations:
83
+ required: false
@@ -0,0 +1,56 @@
1
+ name: Feature request
2
+ description: Suggest a new feature or enhancement
3
+ labels: ["enhancement"]
4
+ body:
5
+ - type: markdown
6
+ attributes:
7
+ value: |
8
+ Thank you for taking the time to suggest a feature! We're glad to have you involved with bitbucket-jira-cli.
9
+
10
+ **Before submitting, please make sure to search through [existing feature requests](https://github.com/Spenhouet/bitbucket-jira-cli/issues?q=is:issue+is:open+label:enhancement) (including [closed](https://github.com/Spenhouet/bitbucket-jira-cli/issues?q=is:issue%20state:closed%20label:enhancement)).**
11
+
12
+ - type: textarea
13
+ attributes:
14
+ label: Problem Description
15
+ description: |
16
+ A clear and concise description of the problem or limitation you're experiencing.
17
+
18
+ What is the use case? What workflow or task would this feature enable or improve?
19
+ validations:
20
+ required: true
21
+
22
+ - type: textarea
23
+ attributes:
24
+ label: Proposed Solution
25
+ description: |
26
+ A clear and concise description of what you want to happen.
27
+
28
+ How do you envision this feature working? What would the ideal implementation look like?
29
+
30
+ If you have ideas about commands, options, or configuration, please include examples:
31
+ ```bash
32
+ # Example command or usage
33
+ bitbucket-jira-cli <your-suggested-command>
34
+ ```
35
+ validations:
36
+ required: true
37
+
38
+ - type: textarea
39
+ attributes:
40
+ label: Alternatives Considered
41
+ description: |
42
+ A clear and concise description of any alternative solutions or features you've considered.
43
+
44
+ Are there workarounds you're currently using? What other tools or approaches have you tried?
45
+ validations:
46
+ required: false
47
+
48
+ - type: textarea
49
+ attributes:
50
+ label: Use Cases
51
+ description: |
52
+ Describe specific scenarios where this feature would be helpful.
53
+
54
+ Please provide concrete examples of how you (or others) would use this feature in practice.
55
+ validations:
56
+ required: false
@@ -0,0 +1,38 @@
1
+ name: Question
2
+ description: Ask a question about bitbucket-jira-cli
3
+ labels: ["question"]
4
+ body:
5
+ - type: textarea
6
+ attributes:
7
+ label: Question
8
+ description: Describe your question in detail.
9
+ validations:
10
+ required: true
11
+
12
+ - type: input
13
+ attributes:
14
+ label: Version
15
+ description: What version of bitbucket-jira-cli are you using? (see `bitbucket-jira-cli version`)
16
+ placeholder: e.g., bitbucket-jira-cli 3.0.3
17
+ validations:
18
+ required: false
19
+
20
+ - type: input
21
+ attributes:
22
+ label: Bitbucket Version
23
+ description: |
24
+ What Bitbucket product are you using? Bitbucket Cloud or Server/Data Center.
25
+ Example: `Bitbucket Cloud` or `Bitbucket Server 8.9`
26
+ placeholder: e.g., Bitbucket Cloud or Bitbucket Server 8.9
27
+ validations:
28
+ required: false
29
+
30
+ - type: input
31
+ attributes:
32
+ label: Jira Version
33
+ description: |
34
+ What Jira version are you using (or not)? Include whether it's Cloud or Server/Data Center.
35
+ Example: `Jira Cloud` or `Jira Server 8.20.5`
36
+ placeholder: e.g., Jira Cloud or Jira Server 8.20.5
37
+ validations:
38
+ required: false
@@ -0,0 +1,5 @@
1
+ blank_issues_enabled: false
2
+ contact_links:
3
+ - name: Documentation
4
+ url: https://github.com/Spenhouet/bitbucket-jira-cli#readme
5
+ about: Read the project documentation and README
@@ -0,0 +1,15 @@
1
+ <!--
2
+ Thank you for contributing to bitbucket-jira-cli! To help us out with reviewing, please consider the following:
3
+
4
+ - Does this pull request include a summary of the change? (See below.)
5
+ - Does this pull request include a descriptive title?
6
+ - Does this pull request include references to any relevant issues?
7
+ -->
8
+
9
+ ## Summary
10
+
11
+ <!-- What's the purpose of the change? What does it do, and why? -->
12
+
13
+ ## Test Plan
14
+
15
+ <!-- How was it tested? -->
@@ -0,0 +1,10 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "github-actions"
4
+ directory: "/"
5
+ schedule:
6
+ interval: "daily"
7
+ groups:
8
+ actions:
9
+ patterns:
10
+ - "*"
@@ -0,0 +1,51 @@
1
+ name: Build Docker image
2
+
3
+ on:
4
+ pull_request:
5
+ branches: [main]
6
+ paths:
7
+ - Dockerfile
8
+ - .dockerignore
9
+ - .github/workflows/docker-build.yml
10
+ - pyproject.toml
11
+ - uv.lock
12
+ - bitbucket_jira_cli/**
13
+ # Also build on push to main so the GHA cache is primed on the default
14
+ # branch. Tag-triggered publish runs fall back to the default branch's
15
+ # cache, which would otherwise stay cold until the first release.
16
+ push:
17
+ branches: [main]
18
+ paths:
19
+ - Dockerfile
20
+ - .dockerignore
21
+ - .github/workflows/docker-build.yml
22
+ - pyproject.toml
23
+ - uv.lock
24
+ - bitbucket_jira_cli/**
25
+
26
+ permissions:
27
+ contents: read
28
+
29
+ jobs:
30
+ build:
31
+ name: Build image (PR verification)
32
+ runs-on: ubuntu-latest
33
+ steps:
34
+ - name: Checkout
35
+ uses: actions/checkout@v7
36
+
37
+ - name: Set up QEMU
38
+ uses: docker/setup-qemu-action@v4
39
+
40
+ - name: Set up Docker Buildx
41
+ uses: docker/setup-buildx-action@v4
42
+
43
+ - name: Build (no push)
44
+ uses: docker/build-push-action@v7
45
+ with:
46
+ context: .
47
+ file: ./Dockerfile
48
+ platforms: linux/amd64,linux/arm64
49
+ push: false
50
+ cache-from: type=gha
51
+ cache-to: type=gha,mode=max,ignore-error=true
@@ -0,0 +1,86 @@
1
+ name: Publish Docker image
2
+
3
+ on:
4
+ workflow_call:
5
+ inputs:
6
+ version:
7
+ description: "Release version to publish (e.g. 5.1.0)"
8
+ required: true
9
+ type: string
10
+ workflow_dispatch:
11
+ inputs:
12
+ version:
13
+ description: "Release version to publish (e.g. 5.1.0). Must match an existing git tag."
14
+ required: true
15
+ type: string
16
+
17
+ permissions:
18
+ contents: read
19
+
20
+ jobs:
21
+ publish:
22
+ name: Publish image to Docker Hub
23
+ runs-on: ubuntu-latest
24
+ environment:
25
+ name: dockerhub
26
+ url: https://hub.docker.com/r/${{ vars.DOCKERHUB_IMAGE || 'spenhouet/bitbucket-jira-cli' }}
27
+ env:
28
+ IMAGE_NAME: ${{ vars.DOCKERHUB_IMAGE || 'spenhouet/bitbucket-jira-cli' }}
29
+ steps:
30
+ - name: Checkout release tag
31
+ uses: actions/checkout@v7
32
+ with:
33
+ ref: ${{ inputs.version }}
34
+
35
+ - name: Set up QEMU
36
+ uses: docker/setup-qemu-action@v4
37
+
38
+ - name: Set up Docker Buildx
39
+ uses: docker/setup-buildx-action@v4
40
+
41
+ - name: Log in to Docker Hub
42
+ uses: docker/login-action@v4
43
+ with:
44
+ username: ${{ secrets.DOCKERHUB_USERNAME }}
45
+ password: ${{ secrets.DOCKERHUB_TOKEN }}
46
+
47
+ - name: Extract metadata
48
+ id: meta
49
+ uses: docker/metadata-action@v6
50
+ with:
51
+ images: ${{ env.IMAGE_NAME }}
52
+ tags: |
53
+ type=semver,pattern={{version}},value=${{ inputs.version }}
54
+ type=semver,pattern={{major}}.{{minor}},value=${{ inputs.version }}
55
+ type=semver,pattern={{major}},value=${{ inputs.version }}
56
+ type=raw,value=latest
57
+ labels: |
58
+ org.opencontainers.image.title=bitbucket-jira-cli
59
+ org.opencontainers.image.description=gh-style CLI for Bitbucket and Jira
60
+ org.opencontainers.image.url=https://github.com/${{ github.repository }}
61
+ org.opencontainers.image.source=https://github.com/${{ github.repository }}
62
+ org.opencontainers.image.version=${{ inputs.version }}
63
+ org.opencontainers.image.licenses=MIT
64
+
65
+ - name: Build and push
66
+ uses: docker/build-push-action@v7
67
+ with:
68
+ context: .
69
+ file: ./Dockerfile
70
+ platforms: linux/amd64,linux/arm64
71
+ push: true
72
+ tags: ${{ steps.meta.outputs.tags }}
73
+ labels: ${{ steps.meta.outputs.labels }}
74
+ cache-from: type=gha
75
+ cache-to: type=gha,mode=max,ignore-error=true
76
+ provenance: true
77
+
78
+ - name: Update Docker Hub description
79
+ uses: peter-evans/dockerhub-description@v5
80
+ continue-on-error: true
81
+ with:
82
+ username: ${{ secrets.DOCKERHUB_USERNAME }}
83
+ password: ${{ secrets.DOCKERHUB_TOKEN }}
84
+ repository: ${{ env.IMAGE_NAME }}
85
+ short-description: gh-style CLI for Bitbucket and Jira
86
+ readme-filepath: ./README.md
@@ -0,0 +1,66 @@
1
+ name: Deploy docs
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ paths:
7
+ - "docs/**"
8
+ - "versioned_docs/**"
9
+ - "versioned_sidebars/**"
10
+ - "versions.json"
11
+ - "src/**"
12
+ - "static/**"
13
+ - "docusaurus.config.ts"
14
+ - "sidebars.ts"
15
+ - "tsconfig.json"
16
+ - "package.json"
17
+ - "package-lock.json"
18
+ - ".github/workflows/docs.yml"
19
+ workflow_dispatch:
20
+
21
+ permissions:
22
+ contents: read
23
+ pages: write
24
+ id-token: write
25
+
26
+ concurrency:
27
+ group: pages
28
+ cancel-in-progress: false
29
+
30
+ jobs:
31
+ build:
32
+ name: Build docs
33
+ runs-on: ubuntu-latest
34
+ steps:
35
+ - uses: actions/checkout@v7
36
+ with:
37
+ fetch-depth: 0
38
+
39
+ - name: Setup Node
40
+ uses: actions/setup-node@v6
41
+ with:
42
+ node-version: 20
43
+ cache: npm
44
+
45
+ - name: Install dependencies
46
+ run: npm ci
47
+
48
+ - name: Build site (with versioned docs from git tags)
49
+ run: npm run build:versioned
50
+
51
+ - name: Upload artifact
52
+ uses: actions/upload-pages-artifact@v5
53
+ with:
54
+ path: build
55
+
56
+ deploy:
57
+ name: Deploy to GitHub Pages
58
+ needs: build
59
+ runs-on: ubuntu-latest
60
+ environment:
61
+ name: github-pages
62
+ url: ${{ steps.deployment.outputs.page_url }}
63
+ steps:
64
+ - name: Deploy to GitHub Pages
65
+ id: deployment
66
+ uses: actions/deploy-pages@v5
@@ -0,0 +1,58 @@
1
+ name: Build Python package
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ test:
11
+ name: Test, lint and build
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - uses: actions/checkout@v7
15
+
16
+ - name: Install uv
17
+ uses: astral-sh/setup-uv@v7
18
+ with:
19
+ enable-cache: true
20
+
21
+ - name: Install dependencies
22
+ run: uv sync --locked --all-groups
23
+
24
+ - name: Run linting with ruff
25
+ run: uv run ruff check
26
+
27
+ - name: Check generated command reference is up to date
28
+ run: |
29
+ uv run python scripts/gen_cli_docs.py
30
+ git diff --exit-code docs/reference \
31
+ || { echo "::error::docs/reference is stale — run 'uv run python scripts/gen_cli_docs.py' and commit."; exit 1; }
32
+
33
+ - name: Run tests with pytest
34
+ run: uv run pytest
35
+
36
+ - name: Test build (with sources for development)
37
+ run: uv build
38
+
39
+ - name: Test build (without sources for publication)
40
+ run: |
41
+ rm -rf dist/
42
+ uv build --no-sources
43
+
44
+ - name: Test package installation and import
45
+ run: |
46
+ uv run --with dist/*.whl --no-project -- python -c "import bitbucket_jira_cli; print('Package imports successfully')"
47
+
48
+ - name: Test CLI commands
49
+ run: |
50
+ uv run --with dist/*.whl --no-project bitbucket-jira-cli --help
51
+ uv run --with dist/*.whl --no-project bj --help
52
+
53
+ - name: Upload build artifacts for inspection
54
+ uses: actions/upload-artifact@v7
55
+ with:
56
+ name: build-artifacts
57
+ path: dist/
58
+ retention-days: 5
@@ -0,0 +1,66 @@
1
+ name: Publish Python package
2
+
3
+ on:
4
+ workflow_call:
5
+ inputs:
6
+ version:
7
+ description: "Release version to publish (e.g. 5.1.0)"
8
+ required: true
9
+ type: string
10
+ workflow_dispatch:
11
+ inputs:
12
+ version:
13
+ description: "Release version to publish (e.g. 5.1.0). Must match an existing git tag."
14
+ required: true
15
+ type: string
16
+
17
+ permissions:
18
+ contents: write
19
+ id-token: write
20
+ attestations: write
21
+
22
+ jobs:
23
+ publish:
24
+ name: Publish to PyPI
25
+ runs-on: ubuntu-latest
26
+ environment:
27
+ name: release
28
+ url: https://pypi.org/p/bitbucket-jira-cli
29
+ steps:
30
+ - name: Checkout release tag
31
+ uses: actions/checkout@v7
32
+ with:
33
+ ref: ${{ inputs.version }}
34
+
35
+ - name: Install uv
36
+ uses: astral-sh/setup-uv@v7
37
+ with:
38
+ enable-cache: true
39
+
40
+ - name: Install dependencies
41
+ run: uv sync --locked --all-groups
42
+
43
+ - name: Build distributions
44
+ run: uv build --no-sources
45
+
46
+ - name: Generate artifact attestations
47
+ uses: actions/attest-build-provenance@v4.1.1
48
+ with:
49
+ subject-path: "dist/*"
50
+
51
+ - name: Publish to PyPI
52
+ run: uv publish
53
+
54
+ - name: Sign the distributions with Sigstore
55
+ uses: sigstore/gh-action-sigstore-python@v3.4.0
56
+ with:
57
+ inputs: >-
58
+ ./dist/*.tar.gz
59
+ ./dist/*.whl
60
+
61
+ - name: Upload signed artifacts to GitHub Release
62
+ env:
63
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
64
+ run: |
65
+ gh release upload "${{ inputs.version }}" dist/** \
66
+ --repo "$GITHUB_REPOSITORY"
@@ -0,0 +1,109 @@
1
+ name: Release
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ inputs:
6
+ version_bump:
7
+ description: "Version bump type"
8
+ required: true
9
+ default: "patch"
10
+ type: choice
11
+ options:
12
+ - patch
13
+ - minor
14
+ - major
15
+ - alpha
16
+ - beta
17
+ - rc
18
+ custom_version:
19
+ description: "Custom version (leave empty to use bump type)"
20
+ required: false
21
+ type: string
22
+
23
+ permissions:
24
+ contents: write
25
+ id-token: write
26
+ attestations: write
27
+
28
+ jobs:
29
+ release:
30
+ name: Bump version and create release
31
+ runs-on: ubuntu-latest
32
+ permissions:
33
+ contents: write
34
+ outputs:
35
+ version: ${{ steps.export-version.outputs.value }}
36
+ steps:
37
+ - uses: actions/checkout@v7
38
+ with:
39
+ token: ${{ secrets.GITHUB_TOKEN }}
40
+
41
+ - name: Install uv
42
+ uses: astral-sh/setup-uv@v7
43
+ with:
44
+ enable-cache: true
45
+
46
+ - name: Install dependencies
47
+ run: uv sync --locked --all-groups
48
+
49
+ - name: Update version (custom)
50
+ if: ${{ github.event.inputs.custom_version != '' }}
51
+ run: |
52
+ uv version ${{ github.event.inputs.custom_version }}
53
+ echo "NEW_VERSION=${{ github.event.inputs.custom_version }}" >> $GITHUB_ENV
54
+
55
+ - name: Update version (bump)
56
+ if: ${{ github.event.inputs.custom_version == '' }}
57
+ run: |
58
+ NEW_VERSION=$(uv version --bump ${{ github.event.inputs.version_bump }} | awk '{print $NF}')
59
+ echo "NEW_VERSION=${NEW_VERSION}" >> $GITHUB_ENV
60
+
61
+ - name: Export version as job output
62
+ id: export-version
63
+ run: echo "value=${NEW_VERSION}" >> "$GITHUB_OUTPUT"
64
+
65
+ - name: Test build with new version
66
+ run: |
67
+ uv build --no-sources
68
+ uv run --with dist/*.whl --no-project -- python -c "import bitbucket_jira_cli; print('Package imports successfully')"
69
+
70
+ - name: Update version references in README and docs
71
+ run: scripts/bump-docs-version.sh "${{ env.NEW_VERSION }}"
72
+
73
+ - name: Commit version update
74
+ run: |
75
+ git config --local user.email "action@github.com"
76
+ git config --local user.name "GitHub Action"
77
+ # -u: stage modifications to tracked files only; never add untracked files.
78
+ git add -u pyproject.toml uv.lock README.md docs src
79
+ git diff --cached --quiet || git commit -m "Bump version to ${{ env.NEW_VERSION }}"
80
+ git push
81
+
82
+ - name: Create release tag
83
+ run: |
84
+ git tag "${{ env.NEW_VERSION }}"
85
+ git push origin "${{ env.NEW_VERSION }}"
86
+
87
+ - name: Create and publish GitHub Release
88
+ env:
89
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
90
+ run: |
91
+ gh release create "${{ env.NEW_VERSION }}" \
92
+ --title "Release ${{ env.NEW_VERSION }}" \
93
+ --generate-notes
94
+
95
+ publish-python:
96
+ name: Publish Python package
97
+ needs: release
98
+ uses: ./.github/workflows/python-publish.yml
99
+ with:
100
+ version: ${{ needs.release.outputs.version }}
101
+ secrets: inherit
102
+
103
+ publish-docker:
104
+ name: Publish Docker image
105
+ needs: release
106
+ uses: ./.github/workflows/docker-publish.yml
107
+ with:
108
+ version: ${{ needs.release.outputs.version }}
109
+ secrets: inherit