Comments (7)
Me too.
The test may be hard to write though because we don't yet have API support for creating new pull requests... Something to keep in mind.
from powershellforgithub.
Thanks Raghav! I've given your tentative PR an initial code review. I do think that it would be best to only check in features that have corresponding tests that can help ensure that the module remains working as expected. If you're able to add the necessary, tested methods for creating branches so that you can add tests for this PR, that would be great.
I think you may run into some trouble writing tests for the refs API's too though, because per the documentation, you can't create new refs on empty repos...so, you'd have to make sure that it has content in it first. It's possible that using -AutoInit
to create it with an empty README will be sufficient to satisfy that requirement however.
from powershellforgithub.
Here are my proposals for this cmdlet:
Name: Merge-GitHubRepositoryBranches
FileName: GitHubRepositoryMerge.ps1
It takes the following parameters
- OwnerName
- RepositoryName
- Uri
- AccessToken
- NoStatus
- Base (base in the API)
- Head (head in the API)
- CommitMessage (commit_message in the API)
Checklists
- Test the cmdlet using my own access token
- Add tests testing for different combinations of parameters
I have read the contributing.md and will try to follow the same.
@HowardWolosky would like to know if there are anything additional I need to keep in mind before implementation
from powershellforgithub.
Thanks @raghav710! Overall, this looks great. Looking forward to having this functionality.
Some minor feedback here:
- Please keep
AccessToken
andNoStatus
as the last parameters in the method, just for consistency with the rest of the module. - You may want to call
Invoke-GHRestMethod
with the-ExtendedResult
parameter so that you can detect a201
vs a204
and be able to doWrite-Log -Level Warning
in the event that it's a204
explaining that there's nothing to merge.
from powershellforgithub.
@HowardWolosky thanks for the note on the 201
vs 204
. Looking forward to getting this in :)
from powershellforgithub.
@HowardWolosky I think I need the ability to create branches so I can add tests for this. Shall I concentrate on adding that and then come back to this?
from powershellforgithub.
Also, here is a tentative PR: #89
I've tested the code manually using my own access token
from powershellforgithub.
Related Issues (20)
- Get-GitHubRepositoryLanguage for multiple repos? HOT 5
- Missing contributors from Get-GitHubRepositoryContributor
- Missing Org Role information from Get-GitHubOrganizationMember HOT 1
- Get-GitHubUser fails HOT 3
- PSProvider for GitHub
- Get-GitHubOrganizationMember does not use DefaultOwnerName
- GitHubRepositories: Unit Tests are Failing when Checking for `has_wiki` on Private Repositories
- Add support for authentication with JWT HOT 2
- API Coverage: Add Support for Codespaces HOT 1
- Exported functions not behaving correctly with -ErrorAction SilentlyContinue HOT 3
- Get-GitHubIssue commands different output
- Add additional filtering parameters to Get-GitHubPullRequest
- Reliance on BinaryFormatter breaks module with PowerShell 7.4.0-preview.4 HOT 5
- telemetry error HOT 3
- telemetry error HOT 1
- Powershell core on linux HOT 2
- JiwJiw73 HOT 1
- Get-GithubRepository doesn't appear to honor ErrorAction inside a a try/catch HOT 1
- JiwJiw73
- Encountered a problem while trying to record telemetry events
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from powershellforgithub.