mirror of
https://github.com/EpicMorg/atlassian-downloader.git
synced 2025-03-13 13:50:18 +03:00
commit
8fc9c772e9
76
.github/CODE_OF_CONDUCT.md
vendored
Normal file
76
.github/CODE_OF_CONDUCT.md
vendored
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
# Contributor Covenant Code of Conduct
|
||||||
|
|
||||||
|
## Our Pledge
|
||||||
|
|
||||||
|
In the interest of fostering an open and welcoming environment, we as
|
||||||
|
contributors and maintainers pledge to making participation in our project and
|
||||||
|
our community a harassment-free experience for everyone, regardless of age, body
|
||||||
|
size, disability, ethnicity, sex characteristics, gender identity and expression,
|
||||||
|
level of experience, education, socio-economic status, nationality, personal
|
||||||
|
appearance, race, religion, or sexual identity and orientation.
|
||||||
|
|
||||||
|
## Our Standards
|
||||||
|
|
||||||
|
Examples of behavior that contributes to creating a positive environment
|
||||||
|
include:
|
||||||
|
|
||||||
|
* Using welcoming and inclusive language
|
||||||
|
* Being respectful of differing viewpoints and experiences
|
||||||
|
* Gracefully accepting constructive criticism
|
||||||
|
* Focusing on what is best for the community
|
||||||
|
* Showing empathy towards other community members
|
||||||
|
|
||||||
|
Examples of unacceptable behavior by participants include:
|
||||||
|
|
||||||
|
* The use of sexualized language or imagery and unwelcome sexual attention or
|
||||||
|
advances
|
||||||
|
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||||
|
* Public or private harassment
|
||||||
|
* Publishing others' private information, such as a physical or electronic
|
||||||
|
address, without explicit permission
|
||||||
|
* Other conduct which could reasonably be considered inappropriate in a
|
||||||
|
professional setting
|
||||||
|
|
||||||
|
## Our Responsibilities
|
||||||
|
|
||||||
|
Project maintainers are responsible for clarifying the standards of acceptable
|
||||||
|
behavior and are expected to take appropriate and fair corrective action in
|
||||||
|
response to any instances of unacceptable behavior.
|
||||||
|
|
||||||
|
Project maintainers have the right and responsibility to remove, edit, or
|
||||||
|
reject comments, commits, code, wiki edits, issues, and other contributions
|
||||||
|
that are not aligned to this Code of Conduct, or to ban temporarily or
|
||||||
|
permanently any contributor for other behaviors that they deem inappropriate,
|
||||||
|
threatening, offensive, or harmful.
|
||||||
|
|
||||||
|
## Scope
|
||||||
|
|
||||||
|
This Code of Conduct applies both within project spaces and in public spaces
|
||||||
|
when an individual is representing the project or its community. Examples of
|
||||||
|
representing a project or community include using an official project e-mail
|
||||||
|
address, posting via an official social media account, or acting as an appointed
|
||||||
|
representative at an online or offline event. Representation of a project may be
|
||||||
|
further defined and clarified by project maintainers.
|
||||||
|
|
||||||
|
## Enforcement
|
||||||
|
|
||||||
|
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||||
|
reported by contacting the project team at developer@epicm.org. All
|
||||||
|
complaints will be reviewed and investigated and will result in a response that
|
||||||
|
is deemed necessary and appropriate to the circumstances. The project team is
|
||||||
|
obligated to maintain confidentiality with regard to the reporter of an incident.
|
||||||
|
Further details of specific enforcement policies may be posted separately.
|
||||||
|
|
||||||
|
Project maintainers who do not follow or enforce the Code of Conduct in good
|
||||||
|
faith may face temporary or permanent repercussions as determined by other
|
||||||
|
members of the project's leadership.
|
||||||
|
|
||||||
|
## Attribution
|
||||||
|
|
||||||
|
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
||||||
|
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
||||||
|
|
||||||
|
[homepage]: https://www.contributor-covenant.org
|
||||||
|
|
||||||
|
For answers to common questions about this code of conduct, see
|
||||||
|
https://www.contributor-covenant.org/faq
|
17
.github/CONTRIBUTING.md
vendored
Normal file
17
.github/CONTRIBUTING.md
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
# Contributing
|
||||||
|
|
||||||
|
When contributing to this repository, please first discuss the change you wish to make via issue,
|
||||||
|
email, or any other method with the owners of this repository before making a change.
|
||||||
|
|
||||||
|
Please note we have a code of conduct, please follow it in all your interactions with the project.
|
||||||
|
|
||||||
|
## Pull Request Process
|
||||||
|
|
||||||
|
1. Ensure any install or build dependencies are removed before the end of the layer when doing a
|
||||||
|
build.
|
||||||
|
2. Update the README.md with details of changes to the interface, this includes new environment
|
||||||
|
variables, exposed ports, useful file locations and container parameters.
|
||||||
|
3. Increase the version numbers in any examples files and the README.md to the new version that this
|
||||||
|
Pull Request would represent.
|
||||||
|
4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you
|
||||||
|
do not have permission to do that, you may request the second reviewer to merge it for you.
|
13
.github/FUNDING.yml
vendored
Normal file
13
.github/FUNDING.yml
vendored
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# These are supported funding model platforms
|
||||||
|
patreon: epicmorg
|
||||||
|
ko_fi: epicmorg
|
||||||
|
custom: https://ko-fi.com/alexz696
|
||||||
|
|
||||||
|
#github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
||||||
|
#open_collective: # Replace with a single Open Collective username
|
||||||
|
#tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||||
|
#community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||||
|
#liberapay: # Replace with a single Liberapay username
|
||||||
|
#issuehunt: # Replace with a single IssueHunt username
|
||||||
|
#otechie: # Replace with a single Otechie username
|
||||||
|
#custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
27
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
27
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
---
|
||||||
|
name: Bug report
|
||||||
|
about: Create a report to help us improve
|
||||||
|
title: ''
|
||||||
|
labels: 'bug, Regular Priority'
|
||||||
|
assignees: 'stamepicmorg'
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Describe the bug**
|
||||||
|
A clear and concise description of what the bug is.
|
||||||
|
|
||||||
|
**To Reproduce**
|
||||||
|
Steps to reproduce the behavior:
|
||||||
|
1. Go to '...'
|
||||||
|
2. Click on '....'
|
||||||
|
3. Scroll down to '....'
|
||||||
|
4. See error
|
||||||
|
|
||||||
|
**Expected behavior**
|
||||||
|
A clear and concise description of what you expected to happen.
|
||||||
|
|
||||||
|
**Screenshots**
|
||||||
|
If applicable, add screenshots to help explain your problem.
|
||||||
|
|
||||||
|
**Additional context**
|
||||||
|
Add any other context about the problem here.
|
18
.github/ISSUE_TEMPLATE/cve_report.md
vendored
Normal file
18
.github/ISSUE_TEMPLATE/cve_report.md
vendored
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
---
|
||||||
|
name: CVE report
|
||||||
|
about: Create a report of some CVE
|
||||||
|
title: '[CVE] '
|
||||||
|
labels: 'CVE, High Priority'
|
||||||
|
assignees: 'stamepicmorg'
|
||||||
|
|
||||||
|
---
|
||||||
|
**CVE number or URL**
|
||||||
|
|
||||||
|
**Describe**
|
||||||
|
A clear and concise description of what the CVE is.
|
||||||
|
|
||||||
|
**Screenshots**
|
||||||
|
If applicable, add screenshots to help explain your problem.
|
||||||
|
|
||||||
|
**Additional context**
|
||||||
|
Add any other context about the problem here.
|
21
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
21
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
---
|
||||||
|
name: Feature request
|
||||||
|
about: Suggest an idea for this project
|
||||||
|
title: ''
|
||||||
|
labels: 'Feature request, help wanted'
|
||||||
|
assignees: 'stamepicmorg'
|
||||||
|
milestone: 'Due 2021 🙏'
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Is your feature request related to a problem? Please describe.**
|
||||||
|
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||||
|
|
||||||
|
**Describe the solution you'd like**
|
||||||
|
A clear and concise description of what you want to happen.
|
||||||
|
|
||||||
|
**Describe alternatives you've considered**
|
||||||
|
A clear and concise description of any alternative solutions or features you've considered.
|
||||||
|
|
||||||
|
**Additional context**
|
||||||
|
Add any other context or screenshots about the feature request here.
|
17
.github/ISSUE_TEMPLATE/task_generic.md
vendored
Normal file
17
.github/ISSUE_TEMPLATE/task_generic.md
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
---
|
||||||
|
name: Generic task
|
||||||
|
about: Create a generic task
|
||||||
|
title: ''
|
||||||
|
labels: 'task, Regular Priority'
|
||||||
|
assignees: 'stamepicmorg'
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Describe**
|
||||||
|
A clear and concise description of what the bug is.
|
||||||
|
|
||||||
|
**Screenshots**
|
||||||
|
If applicable, add screenshots to help explain your problem.
|
||||||
|
|
||||||
|
**Additional context**
|
||||||
|
Add any other context about the problem here.
|
8
.github/dependabot.yml
vendored
Normal file
8
.github/dependabot.yml
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
version: 2
|
||||||
|
updates:
|
||||||
|
- package-ecosystem: docker
|
||||||
|
directory: "/atlassian/jira/latest"
|
||||||
|
schedule:
|
||||||
|
interval: daily
|
||||||
|
time: "02:00"
|
||||||
|
open-pull-requests-limit: 10
|
13
.github/pull_request_template.md
vendored
Normal file
13
.github/pull_request_template.md
vendored
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
## Purpose
|
||||||
|
_Describe the problem or feature in addition to a link to the issues._
|
||||||
|
|
||||||
|
## Approach
|
||||||
|
_How does this change address the problem?_
|
||||||
|
|
||||||
|
#### Open Questions and Pre-Merge TODOs
|
||||||
|
- [ ] Use github checklists. When solved, check the box and explain the answer.
|
||||||
|
|
||||||
|
## Learning
|
||||||
|
_Describe the research stage_
|
||||||
|
|
||||||
|
_Links to blog posts, patterns, libraries or addons used to solve this problem_
|
BIN
.github/screenshot-1.png
vendored
Normal file
BIN
.github/screenshot-1.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 22 KiB |
21
LICENSE.md
Normal file
21
LICENSE.md
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2018-2021 EpicMorg: Main
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
76
README.md
76
README.md
@ -1 +1,75 @@
|
|||||||
# atlassian-downloader
|
# [](https://github.com/EpicMorg/atlassian-downloader/commits) [](https://github.com/EpicMorg/atlassian-downloader/issues) [](https://github.com/EpicMorg/atlassian-downloader/network) [](https://github.com/EpicMorg/atlassian-downloader/stargazers) [](https://github.com/EpicMorg/atlassian-downloader/archive/master.zip) [](https://github.com/EpicMorg/atlassian-downloader/releases) [](LICENSE.md) [](CHANGELOG.md)
|
||||||
|
|
||||||
|
# Atlassian Downloader
|
||||||
|
|
||||||
|
Simple script written with `c#` and `dotnet5` for downloadind all avalible products from `Atlassian`. Why not?
|
||||||
|
|
||||||
|
## Authors
|
||||||
|
* [@kasthack](https://github.com/kasthack) - core code
|
||||||
|
* [@stam](https://github.com/stamepicmorg) - edits
|
||||||
|
|
||||||
|
## Requerments
|
||||||
|
1. Preinstalled `dotnet5`. Download [here](https://dotnet.microsoft.com/download/dotnet/5.0).
|
||||||
|
2. Supported OS: `win32` or `win64`, `linux`, `macosx`
|
||||||
|
|
||||||
|
## How to
|
||||||
|
1. `git clone` this repo.
|
||||||
|
2. `cd` to `repo/src`.
|
||||||
|
3. execute `donten run` in `src` folder.
|
||||||
|
4. all data will be downloaded to `src/output` folder and subfolders
|
||||||
|
|
||||||
|
------
|
||||||
|
|
||||||
|
## Supported products:
|
||||||
|
|
||||||
|
### Current links
|
||||||
|
|
||||||
|
#### Bamboo
|
||||||
|
* https://my.atlassian.com/download/feeds/current/bamboo.json
|
||||||
|
|
||||||
|
#### Bitbucket (Stash)
|
||||||
|
* https://my.atlassian.com/download/feeds/current/stash.json
|
||||||
|
|
||||||
|
#### Confluence
|
||||||
|
* https://my.atlassian.com/download/feeds/current/confluence.json
|
||||||
|
|
||||||
|
#### Crowd
|
||||||
|
* https://my.atlassian.com/download/feeds/current/crowd.json
|
||||||
|
|
||||||
|
#### Crucible
|
||||||
|
* https://my.atlassian.com/download/feeds/current/crucible.json
|
||||||
|
|
||||||
|
#### FishEye
|
||||||
|
* https://my.atlassian.com/download/feeds/current/fisheye.json
|
||||||
|
|
||||||
|
#### Jira
|
||||||
|
* https://my.atlassian.com/download/feeds/current/jira-core.json
|
||||||
|
* https://my.atlassian.com/download/feeds/current/jira-software.json
|
||||||
|
* https://my.atlassian.com/download/feeds/current/jira-servicedesk.json
|
||||||
|
|
||||||
|
|
||||||
|
### Archived links
|
||||||
|
|
||||||
|
#### Bamboo
|
||||||
|
* https://my.atlassian.com/download/feeds/archived/bamboo.json
|
||||||
|
|
||||||
|
#### Bitbucket (Stash)
|
||||||
|
* https://my.atlassian.com/download/feeds/archived/stash.json
|
||||||
|
|
||||||
|
#### Confluence
|
||||||
|
* https://my.atlassian.com/download/feeds/archived/confluence.json
|
||||||
|
|
||||||
|
#### Crowd
|
||||||
|
* https://my.atlassian.com/download/feeds/archived/crowd.json
|
||||||
|
|
||||||
|
#### Crucible
|
||||||
|
* https://my.atlassian.com/download/feeds/archived/crucible.json
|
||||||
|
|
||||||
|
#### FishEye
|
||||||
|
* https://my.atlassian.com/download/feeds/archived/fisheye.json
|
||||||
|
|
||||||
|
#### Jira
|
||||||
|
* https://my.atlassian.com/download/feeds/archived/jira.json
|
||||||
|
* https://my.atlassian.com/download/feeds/archived/jira-core.json
|
||||||
|
* https://my.atlassian.com/download/feeds/archived/jira-software.json
|
||||||
|
* https://my.atlassian.com/download/feeds/archived/jira-servicedesk.json
|
14
SECURITY.md
Normal file
14
SECURITY.md
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# Security Policy
|
||||||
|
|
||||||
|
## Supported Docker Engine Versions
|
||||||
|
|
||||||
|
| Version | Supported |
|
||||||
|
| ------- | ------------------ |
|
||||||
|
| Docker >=19.x | :white_check_mark: |
|
||||||
|
| Linux x86_64 Images | :white_check_mark: |
|
||||||
|
|
||||||
|
## Reporting a Vulnerability
|
||||||
|
1. Open `Issues` tab [here](https://github.com/EpicMorg/docker-scripts/issues).
|
||||||
|
2. Select `CVE Report`.
|
||||||
|
3. Publish `CVE Report`.
|
||||||
|
4. Thank you :heart:
|
29
src/AtlassianDownloader.csproj
Normal file
29
src/AtlassianDownloader.csproj
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<TargetFramework>net5.0</TargetFramework>
|
||||||
|
<ApplicationIcon>favicon.ico</ApplicationIcon>
|
||||||
|
<PackageId>EpicMorg.Atlassian.Downloader</PackageId>
|
||||||
|
<Authors>Atlassian Downloader</Authors>
|
||||||
|
<Description>Atlassian Downloader by EpicMorg, code by kasthack</Description>
|
||||||
|
<PackageProjectUrl>https://github.com/EpicMorg/atlassian-downloader</PackageProjectUrl>
|
||||||
|
<PackageIcon>favicon.png</PackageIcon>
|
||||||
|
<FileVersion>1.0.0.2</FileVersion>
|
||||||
|
<RepositoryType>git</RepositoryType>
|
||||||
|
<RepositoryUrl>https://github.com/EpicMorg/atlassian-downloader</RepositoryUrl>
|
||||||
|
<PackageTags>atlassian, donwloader, epicmorg</PackageTags>
|
||||||
|
<AssemblyVersion>1.0.0.3</AssemblyVersion>
|
||||||
|
<Version>1.0.0.3</Version>
|
||||||
|
<Copyright>EpicMorg 20201</Copyright>
|
||||||
|
<Product>Atlassian Downloader</Product>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="favicon.png">
|
||||||
|
<Pack>True</Pack>
|
||||||
|
<PackagePath></PackagePath>
|
||||||
|
</None>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
25
src/AtlassianDownloader.sln
Normal file
25
src/AtlassianDownloader.sln
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio Version 16
|
||||||
|
VisualStudioVersion = 16.0.30803.129
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AtlassianDownloader", "AtlassianDownloader.csproj", "{9C7EA014-5883-4FCD-BF1D-DC561F8958DD}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{9C7EA014-5883-4FCD-BF1D-DC561F8958DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{9C7EA014-5883-4FCD-BF1D-DC561F8958DD}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{9C7EA014-5883-4FCD-BF1D-DC561F8958DD}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{9C7EA014-5883-4FCD-BF1D-DC561F8958DD}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
SolutionGuid = {6DE5A36D-883D-4DA1-9962-38FDD1EAD190}
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
106
src/Program.cs
Normal file
106
src/Program.cs
Normal file
@ -0,0 +1,106 @@
|
|||||||
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Text.Json;
|
||||||
|
|
||||||
|
var appTitle = System.Reflection.Assembly.GetExecutingAssembly().GetName().Name;
|
||||||
|
var appVersion = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
|
||||||
|
var appStartupDate = DateTime.Now;
|
||||||
|
var appBuildType = "[Release]";
|
||||||
|
#if DEBUG
|
||||||
|
appBuildType = "[Debug]";
|
||||||
|
#endif
|
||||||
|
|
||||||
|
var outputDir = "output";
|
||||||
|
var feedUrls =
|
||||||
|
new[] {
|
||||||
|
"https://my.atlassian.com/download/feeds/archived/bamboo.json",
|
||||||
|
"https://my.atlassian.com/download/feeds/archived/confluence.json",
|
||||||
|
"https://my.atlassian.com/download/feeds/archived/crowd.json",
|
||||||
|
"https://my.atlassian.com/download/feeds/archived/crucible.json",
|
||||||
|
"https://my.atlassian.com/download/feeds/archived/fisheye.json",
|
||||||
|
"https://my.atlassian.com/download/feeds/archived/jira-core.json",
|
||||||
|
"https://my.atlassian.com/download/feeds/archived/jira-servicedesk.json",
|
||||||
|
"https://my.atlassian.com/download/feeds/archived/jira-software.json",
|
||||||
|
"https://my.atlassian.com/download/feeds/archived/jira.json",
|
||||||
|
"https://my.atlassian.com/download/feeds/archived/stash.json",
|
||||||
|
|
||||||
|
"https://my.atlassian.com/download/feeds/current/bamboo.json",
|
||||||
|
"https://my.atlassian.com/download/feeds/current/confluence.json",
|
||||||
|
"https://my.atlassian.com/download/feeds/current/crowd.json",
|
||||||
|
"https://my.atlassian.com/download/feeds/current/crucible.json",
|
||||||
|
"https://my.atlassian.com/download/feeds/current/fisheye.json",
|
||||||
|
"https://my.atlassian.com/download/feeds/current/jira-core.json",
|
||||||
|
"https://my.atlassian.com/download/feeds/current/jira-servicedesk.json",
|
||||||
|
"https://my.atlassian.com/download/feeds/current/jira-software.json",
|
||||||
|
"https://my.atlassian.com/download/feeds/current/stash.json"
|
||||||
|
};
|
||||||
|
|
||||||
|
Console.Title = $"{appTitle} {appVersion} {appBuildType}";
|
||||||
|
Console.WriteLine($"Download started at {appStartupDate}.");
|
||||||
|
|
||||||
|
var client = new HttpClient();
|
||||||
|
foreach (var feedUrl in feedUrls)
|
||||||
|
{
|
||||||
|
var feedDir = Path.Combine(outputDir, feedUrl[(feedUrl.LastIndexOf('/') + 1)..(feedUrl.LastIndexOf('.'))]);
|
||||||
|
var atlassianJson = await client.GetStringAsync(feedUrl);
|
||||||
|
var callString = "downloads(";
|
||||||
|
var json = atlassianJson[callString.Length..^1];
|
||||||
|
var parsed = JsonSerializer.Deserialize<ResponseArray[]>(json, new JsonSerializerOptions
|
||||||
|
{
|
||||||
|
PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
|
||||||
|
});
|
||||||
|
var versions = parsed.GroupBy(a => a.Version).ToDictionary(a => a.Key, a => a.ToArray());
|
||||||
|
|
||||||
|
foreach (var version in versions)
|
||||||
|
{
|
||||||
|
var directory = Path.Combine(feedDir, version.Key);
|
||||||
|
if (!Directory.Exists(directory))
|
||||||
|
{
|
||||||
|
Directory.CreateDirectory(directory);
|
||||||
|
}
|
||||||
|
foreach (var file in version.Value)
|
||||||
|
{
|
||||||
|
var serverPath = file.ZipUrl.PathAndQuery;
|
||||||
|
var outputFile = Path.Combine(directory, serverPath[(serverPath.LastIndexOf("/") + 1)..]);
|
||||||
|
if (!File.Exists(outputFile))
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(file.Md5))
|
||||||
|
{
|
||||||
|
File.WriteAllText(outputFile + ".md5", file.Md5);
|
||||||
|
}
|
||||||
|
using var outputStream = File.OpenWrite(outputFile);
|
||||||
|
using var request = await client.GetStreamAsync(file.ZipUrl).ConfigureAwait(false);
|
||||||
|
await request.CopyToAsync(outputStream).ConfigureAwait(false);
|
||||||
|
Console.ForegroundColor = ConsoleColor.Green;
|
||||||
|
Console.WriteLine($"[INFO] File \"{file.ZipUrl}\" successfully downloaded to \"{outputFile}\".");
|
||||||
|
Console.ResetColor();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Console.ForegroundColor = ConsoleColor.Yellow;
|
||||||
|
Console.WriteLine($"[WARN] File \"{outputFile}\" already exists. Download from \"{file.ZipUrl}\" skipped.");
|
||||||
|
Console.ResetColor();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Console.WriteLine($"[SUCCESS] All files from \"{feedUrl}\" successfully downloaded.");
|
||||||
|
}
|
||||||
|
Console.WriteLine($"Download complete at {appStartupDate}.");
|
||||||
|
|
||||||
|
public partial class ResponseArray
|
||||||
|
{
|
||||||
|
public string Description { get; set; }
|
||||||
|
public string Edition { get; set; }
|
||||||
|
public Uri ZipUrl { get; set; }
|
||||||
|
public object TarUrl { get; set; }
|
||||||
|
public string Md5 { get; set; }
|
||||||
|
public string Size { get; set; }
|
||||||
|
public string Released { get; set; }
|
||||||
|
public string Type { get; set; }
|
||||||
|
public string Platform { get; set; }
|
||||||
|
public string Version { get; set; }
|
||||||
|
public Uri ReleaseNotes { get; set; }
|
||||||
|
public Uri UpgradeNotes { get; set; }
|
||||||
|
}
|
BIN
src/favicon.ico
Normal file
BIN
src/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
BIN
src/favicon.png
Normal file
BIN
src/favicon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
Loading…
x
Reference in New Issue
Block a user