Comments (11)
@infinisil Just saw your comment here: #2849 (comment)
This fix did actually address your original issue, but now the problem has shifted to the later fetch
of the pull request branch. I can't hardcode that to depth=1, because there will be cases where some users have multiple commits on the branch.
I have an idea to fix it. I'll experiment with it next week.
from create-pull-request.
Released as v6.0.4
/ v6
.
from create-pull-request.
Ah good point, I now updated the fork to PR against and reran the action, looks like that also works: https://github.com/NixOS/nixpkgs-check-by-name/actions/runs/8707862728/job/23892105339
from create-pull-request.
I was just searching through this repo briefly and I wonder if this comment is related?
from create-pull-request.
Hi @infinisil
could a GitHub server update make this be possible suddenly?
I think you might be right. It seems to be working now without doing the fetch with --unshallow
! 😮
Thank you for pointing it out! I'll release a fix for this.
from create-pull-request.
Released as v6.0.3
/ v6
.
Thank you!
from create-pull-request.
@infinisil, would you be willing to test a new version of the action before I release it? It's not easy for me to test this with a real-world case like yours. I've made a change to limit the fetch depth when fetching the pull request branch.
You can try the new version like this:
uses: peter-evans/create-pull-request@branch-fetch-depth
from create-pull-request.
Sure! Just did, and it seems to work: https://github.com/NixOS/nixpkgs-check-by-name/actions/runs/8707862728/job/23883876037 ✨ (tweag/nixpkgs#91, this is a PR from a fork to another fork, but I don't think that would influence the result)
from create-pull-request.
Sure! Just did, and it seems to work: https://github.com/NixOS/nixpkgs-check-by-name/actions/runs/8707862728/job/23883876037 ✨ (tweag/nixpkgs#91, this is a PR from a fork to another fork, but I don't think that would influence the result)
Thanks for testing, but this isn't doing the same as your original run here: https://github.com/NixOS/nixpkgs-check-by-name/actions/runs/8633608062/job/23667098826
The PR branch needs to exist before the action runs. Otherwise the fetch just fails and it creates a new branch. The perf problem comes when the branch exists and the fetch pulls all the history for the PR branch. So please keep fork/test-some-change
existing on the fork repo and run it again so the fetch occurs.
from create-pull-request.
Ah good point, I now updated the fork to PR against and reran the action, looks like that also works: https://github.com/NixOS/nixpkgs-check-by-name/actions/runs/8707862728/job/23892105339
Looks good! Down to 15 seconds from 10 minutes. Thank you for testing it.
I'm slightly nervous about releasing this because there is a possibility that someone is using the action in a way that I've not anticipated and this update clobbers their workflow. So just be aware that I might need to roll this back if it causes some issue for a lot of users. I think it will be a rare edge case if it causes any problem at all.
from create-pull-request.
So just be aware that I might need to roll this back if it causes some issue for a lot of users. I think it will be a rare edge case if it causes any problem at all.
Sounds good, no worries, thanks a lot for the quick fix!
from create-pull-request.
Related Issues (20)
- Using environment variables in `body-path` file HOT 1
- bit
- I'm confused what the `base` option is supposed to do HOT 1
- Token generated from GitHub App not working with push-to-fork HOT 4
- Default to "Squash and Merge" HOT 1
- I get error "protected branch hook declined" when I try to create a draft pull request into protected branch HOT 1
- Force update the branch of existing pull request HOT 1
- Empty PRs being created, is this expected? HOT 4
- Error creating new PR HOT 2
- `title-path` and `commit-message-path` inputs HOT 1
- `base` also does a checkout to that branch HOT 1
- Update multiple repositories HOT 2
- ignore untracked HOT 2
- NO PR created and branch changes to new branch and updates from main HOT 5
- Required checks are not being triggered after the PR creation HOT 1
- Error: Input 'token' not supplied. Unable to continue.
- Changes from test folder doesn't added to the PR
- Node version - Warning HOT 1
- Permission denied (publickey) HOT 1
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 create-pull-request.