Open yangwao opened 1 year ago
ooh
steps:
- name: create pull request
run: gh pr create -B base_branch -H branch_to_merge --title 'Merge branch_to_merge into base_branch' --body 'Created by Github action'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Seems what I want would require bit more scripting..
gh pr create -f -B hyper-mint
just list commits
gh api \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"/repos/kodadot/nft-gallery/pulls"
gh api -X GET '/repos/kodadot/nft-gallery/pulls' -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" -f state=closed -f base=main --jq ".[] | .html_url "
https://github.com/kodadot/nft-gallery/pull/5783
https://github.com/kodadot/nft-gallery/pull/5782
https://github.com/kodadot/nft-gallery/pull/5776
https://github.com/kodadot/nft-gallery/pull/5768
https://github.com/kodadot/nft-gallery/pull/5767
https://github.com/kodadot/nft-gallery/pull/5761
https://github.com/kodadot/nft-gallery/pull/5760
https://github.com/kodadot/nft-gallery/pull/5758
https://github.com/kodadot/nft-gallery/pull/5752
https://github.com/kodadot/nft-gallery/pull/5748
https://github.com/kodadot/nft-gallery/pull/5742
https://github.com/kodadot/nft-gallery/pull/5741
https://github.com/kodadot/nft-gallery/pull/5738
https://github.com/kodadot/nft-gallery/pull/5731
https://github.com/kodadot/nft-gallery/pull/5724
https://github.com/kodadot/nft-gallery/pull/5723
https://github.com/kodadot/nft-gallery/pull/5721
https://github.com/kodadot/nft-gallery/pull/5720
https://github.com/kodadot/nft-gallery/pull/5719
https://github.com/kodadot/nft-gallery/pull/5718
https://github.com/kodadot/nft-gallery/pull/5712
https://github.com/kodadot/nft-gallery/pull/5711
https://github.com/kodadot/nft-gallery/pull/5710
https://github.com/kodadot/nft-gallery/pull/5708
https://github.com/kodadot/nft-gallery/pull/5703
https://github.com/kodadot/nft-gallery/pull/5701
https://github.com/kodadot/nft-gallery/pull/5698
https://github.com/kodadot/nft-gallery/pull/5695
https://github.com/kodadot/nft-gallery/pull/5693
https://github.com/kodadot/nft-gallery/pull/5691
yet standard input for body file doesn't work for me at gh utility, idk why 👀
gh api -X GET '/repos/kodadot/nft-gallery/pulls' -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" -f state=closed -f base=main --jq ".[] | .html_url " > gh pr create -t "beta update" -H main -B hyper-mint -l beta --body-file -
with file it works
cat ./standardinputfile | gh pr create -t "beta update" -d -H main -B hyper-mint -l beta --body-file -
Warning: 3 uncommitted changes
https://github.com/kodadot/nft-gallery/pull/5785
ook seems this is working
gh api -X GET '/repos/kodadot/nft-gallery/pulls' -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" -f state=closed -f base=main --jq ".[] | .html_url " > pulls;cat pulls | gh pr create -t "beta update" -d -H main -B hyper-mint -l beta --body-file -
what's needs to be done is to figure out which PRs been already merged in past in beta
branch
seems more elegant and tells if it's merged, not just closed ones
gh pr list -s merged --json url
plus looks like it's possible to search by commit hash
Find a PR that introduced a given commit $ gh pr list --search "
" --state merged
Seems it does working, yet need to add copilot:all or copilot:summary would be nice
gh pr list -s merged --json url -B main --jq ".[] | .url" > pulls; sed 's/^/- /' pulls | gh pr create -t "beta update" -d -H main -B hyper-mint -l beta --body-file -
Thank you for coming to my classes of bash
gh pr list -s merged --json url -B main --jq ".[] | .url" | sed 's/^/- /' $1 | awk 'BEGIN{print "copilot:summary \n"}{ print}' $1
copilot:summary
- https://github.com/kodadot/nft-gallery/pull/5783
- https://github.com/kodadot/nft-gallery/pull/5776
- https://github.com/kodadot/nft-gallery/pull/5768
- https://github.com/kodadot/nft-gallery/pull/5767
- https://github.com/kodadot/nft-gallery/pull/5761
- https://github.com/kodadot/nft-gallery/pull/5760
- https://github.com/kodadot/nft-gallery/pull/5758
- https://github.com/kodadot/nft-gallery/pull/5752
- https://github.com/kodadot/nft-gallery/pull/5748
- https://github.com/kodadot/nft-gallery/pull/5742
- https://github.com/kodadot/nft-gallery/pull/5741
- https://github.com/kodadot/nft-gallery/pull/5738
- https://github.com/kodadot/nft-gallery/pull/5731
- https://github.com/kodadot/nft-gallery/pull/5724
- https://github.com/kodadot/nft-gallery/pull/5723
- https://github.com/kodadot/nft-gallery/pull/5720
- https://github.com/kodadot/nft-gallery/pull/5719
- https://github.com/kodadot/nft-gallery/pull/5718
- https://github.com/kodadot/nft-gallery/pull/5712
- https://github.com/kodadot/nft-gallery/pull/5711
- https://github.com/kodadot/nft-gallery/pull/5710
- https://github.com/kodadot/nft-gallery/pull/5708
- https://github.com/kodadot/nft-gallery/pull/5703
- https://github.com/kodadot/nft-gallery/pull/5701
- https://github.com/kodadot/nft-gallery/pull/5698
- https://github.com/kodadot/nft-gallery/pull/5695
- https://github.com/kodadot/nft-gallery/pull/5693
- https://github.com/kodadot/nft-gallery/pull/5691
- https://github.com/kodadot/nft-gallery/pull/5685
- https://github.com/kodadot/nft-gallery/pull/5675
only missing piece is to find out which PRs are already merged to target branch
gh pr list -s merged --json url -B main --jq ".[] | .url" | sed 's/^/- /' $1 | awk 'BEGIN{print "copilot:summary \n"}{ print}' $1 | gh pr create -t "beta update" -d -H main -B hyper-mint -l beta --body-file -
Ok from next time I'll try use it apparently, maybe bit limit PRs but doing well
Yes, I've never committed it and accidentally removed from local stage lol
https://github.com/kodadot/nft-gallery/blob/main/.github/push_release_beta.sh
I would like to have regular updates going from
main
tobeta
branch with naming which PRs (titles) are being merged there and label it withbeta
label on weekly basis, Tuesday let's say.This might be helpful