{"id":16480888,"url":"https://github.com/ramblingcookiemonster/psstash","last_synced_at":"2025-10-27T17:30:47.341Z","repository":{"id":72634532,"uuid":"36895536","full_name":"RamblingCookieMonster/PSStash","owner":"RamblingCookieMonster","description":"Atlassian Stash PowerShell Module","archived":false,"fork":false,"pushed_at":"2016-01-17T22:56:05.000Z","size":103,"stargazers_count":7,"open_issues_count":0,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-05-01T13:26:06.678Z","etag":null,"topics":["bitbucket","powershell","powershell-modules"],"latest_commit_sha":null,"homepage":null,"language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RamblingCookieMonster.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-06-04T21:07:39.000Z","updated_at":"2021-08-15T22:08:44.000Z","dependencies_parsed_at":"2023-03-18T10:33:40.022Z","dependency_job_id":null,"html_url":"https://github.com/RamblingCookieMonster/PSStash","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RamblingCookieMonster%2FPSStash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RamblingCookieMonster%2FPSStash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RamblingCookieMonster%2FPSStash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RamblingCookieMonster%2FPSStash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RamblingCookieMonster","download_url":"https://codeload.github.com/RamblingCookieMonster/PSStash/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219860928,"owners_count":16556010,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bitbucket","powershell","powershell-modules"],"created_at":"2024-10-11T13:05:39.778Z","updated_at":"2025-10-27T17:30:46.977Z","avatar_url":"https://github.com/RamblingCookieMonster.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build status](https://ci.appveyor.com/api/projects/status/pq7kyu84crviig2q/branch/master?svg=true)](https://ci.appveyor.com/project/RamblingCookieMonster/psstash)\n\nStash PowerShell Module\n=============\n\nThis is a PowerShell module for working with the Atlassian Stash REST API.\n\nThis is an quick and dirty implementation based on my environment's configuration, with limited functionality.  Contributions to improve this would be more than welcome!\n\nChances are high that there will be breaking design changes, this is just a simple POC.\n\n### Examples:\n\nQuery for projects:\n\n[![Public projects](/Media/Get-StashProject.png)](/Media/Get-StashProject.png)\n\nQuery for repositories:\n\n[![Public projects](/Media/Get-StashRepo.png)](/Media/Get-StashRepo.png)\n\nQuery for project permissions:\n\n[![Public projects](/Media/Get-StashProjectUserPermission.png)](/Media/Get-StashProjectUserPermission.png)\n\n[![Public projects](/Media/Get-StashProjectGroupPermission.png)](/Media/Get-StashProjectGroupPermission.png)\n\nQuery for arbitrary objects:\n\n![Objects](/Media/repos.png)\n\n\n\n### Instructions:\n\n```PowerShell\n# One time setup\n    # Download the repository\n    # Unblock the zip\n    # Extract the PSStash folder to a module path (e.g. $env:USERPROFILE\\Documents\\WindowsPowerShell\\Modules\\)\n\n# Import the module.\n    Import-Module PSStash    #Alternatively, Import-Module \\\\Path\\To\\PSStash\n\n# Get commands in the module\n    Get-Command -Module PSStash\n\n# Get help for a command\n    Get-Help Get-StashObject -Full\n    Get-Help Get-StashConfig -Full\n\n# Set a default Uri\n    Set-StashConfig -uri https://stash.contoso.com\n\n# List public projects\n    Get-StashProject\n\n# List repositories that user in $cred has access to\n    Get-StashObject -Object repos -Credential $cred\n\n# List repositories under the 'sysinv' project\n    Get-StashObject -Object projects/sysinv/repos -Credential $cred\n\n# Create, change, and delete objects; for example, projects\n    New-StashObject -Object projects -Credential $Cred -Body @{\n        key = \"TSTPRJ\"\n        name = \"Test Project\"\n        description = \"A Project To Delete\"\n        avatar = \"data:image/png;base64,$Base64EncodedImage\"\n    }\n\n    Set-StashObject -Object projects/TSTPRJ -Credential $cred -Body @{ description = \"MODIFIED DESCRIPTION!\" } -Force\n\n    Remove-StashObject -Object projects/TSTPRJ -Credential $Cred -Force\n\n# Fork a repository into my personal project:\n    New-StashFork -Credential $cred -Project SYSINV -Repo SystemsInventory\n\n# View repositories in my personal project:\n    Get-StashObject -Object projects/~MYUSERNAME/repos -Credential $Cred\n\n# Get project user and group permissions\n    Get-StashProject | Get-StashProjectUserPermission -Cred $Cred\n    Get-StashProject | Get-StashProjectGroupPermission -Cred $Cred\n\n```\n\n### References:\n\n* [Stash Developer Docs](https://developer.atlassian.com/stash/docs/latest/)\n* [Stash Core REST API](https://developer.atlassian.com/static/rest/stash/3.9.2/stash-rest.html)\n\n### TODO:\n\nEverything. This is in the 'can I get it working' state. Need to identify requirements (e.g. which specific objects to create functions for, parameters for these objects, whether to pursue OAUTH) for further work, write functions, tests, etc.\n\nPotential functions:\n\n* [x] Get-StashProject\n* [x] Get-StashRepo\n* [x] New-StashFork\n* [x] Get-StashProjectUserPermission\n* [x] Get-StashProjectGroupPermission\n* [ ] New-StashProject\n* [ ] New-StashRepo\n* [ ] Remove-StashRepo\n* [ ] Get-StashProjectPermission\n* [ ] Set-StashProjectPermission\n* [ ] Add-StashProjectPermission\n* [ ] Get-StashRepoPermission\n* [ ] Set-StashRepoPermission\n* [ ] Add-StashRepoPermission\n* [ ] Remove-StashRepoPermission\n* [ ] Get-StashCommit\n* [ ] Merge-StashPullRequest\n* [ ] Add-StashPullRequestComment\n* [ ] Deny-StashPullRequest\n\nProject Status, 1/17/2016: I no longer work with or have access to Stash / BitBucket Server. Feel free to fork this or use it as needed, but there will likely be no further development, barring external contributions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Framblingcookiemonster%2Fpsstash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Framblingcookiemonster%2Fpsstash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Framblingcookiemonster%2Fpsstash/lists"}