Comments (14)
I've worked around the issue by letting my GitHub Actions test workflow run also on pull request review events:
on: [push, pull_request_review]
Running /rebase
will rebase the branch but the PR will be stuck waiting for the test workflow to finish but it doesn't even start (that's this issue). Approving a review will start it and run it again and then the test workflow finishes 🎉
GitHub can also optionally dismiss an existing review automatically prompting someone to approve the change again triggering the test workflow.
Not perfect but it works for me. Thank you for this rebase action
from rebase.
Thank you, It was an issue on my end. I was trying to test this out in a PR but when I triggered a rebase by adding a /rebase
comment it what using the workflow from the develop branch instead of the PR. Once I merged the PR it worked. I also added persist-credentials: false
to the checkout action
from rebase.
+1
I tryied to pass a custom token, but nothing changed... my test workflows don't fire.
- name: Automatic Rebase
uses: cirrus-actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.MY_GITHUB_API_TOKEN }}
from rebase.
+1
from rebase.
This is a weird Actions limitation that one workflow can't trigger another one. See this community post for more details. I don't believe there is a viable workaround at the moment. On a bright side it does work with 3rdparty CIs like Travis, Circle and Cirrus.
from rebase.
I tried adding
on:
workflow_run:
workflows: ["Automatic Rebase"]
types:
- completed
to test workflow, it is run on default branch not within context of rebased pull request.
Documentation seemed promising
This event occurs when a workflow run is requested or completed, and allows you to execute a workflow based on the finished result of another workflow. For example, if your pull_request workflow generates build artifacts, you can create a new workflow that uses workflow_run to analyze the results and add a comment to the original pull request.
But article about this feature clearly states that
Runs triggered by the workflow_run event always use the default branch for the repository
https://github.blog/2020-08-03-github-actions-improvements-for-fork-and-pull-request-workflows/
from rebase.
This is a weird Actions limitation that one workflow can't trigger another one. See this community post for more details. I don't believe there is a viable workaround at the moment. On a bright side it does work with 3rdparty CIs like Travis, Circle and Cirrus.
this action https://github.com/Label305/AutoRebase can auto rebase and trigger CI workflow by use a personal github token.
I try to use a personal github token for cirrus-actions/rebase, but not work.
from rebase.
I've now created a PR with that workaround description because maybe more people might find it useful.
from rebase.
Do you think this will be fixed anytime soon by the GHA team?
from rebase.
@walterholohan Fixed here #70
from rebase.
@jackton1 I updated the action yaml file to
on:
issue_comment:
types: [created]
name: Automatic Rebase
jobs:
rebase:
name: Rebase
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase')
runs-on: ubuntu-latest
steps:
- name: Checkout the latest code
uses: actions/checkout@v2
with:
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo,
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token.
- name: Automatic Rebase
uses: cirrus-actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
where secrets.GH_PAT
is a PAT that I have setup. However this did not solve the issue. After a successful rebase by thecirrus-actions/[email protected]
action it did not trigger a new check workflow. Am I missing something from the above snippet?
from rebase.
@walterholohan it seems actions/checkout@v2
fails with the default github.token
Update
name: Automatic Rebase
on:
issue_comment:
types: [created]
jobs:
rebase:
name: Rebase
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.PAT_TOKEN }}
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
- name: Automatic Rebase
uses: cirrus-actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
from rebase.
@jackton1 ive changed to the above suggestion but still no luck. The rebase completed successfully but the actions did not get triggered. Does the PAT need certain permissions? Maybe its missing something.
from rebase.
@walterholohan Try again using
Note for workflows that modify github actions you can enable
from rebase.
Related Issues (20)
- GitHub doesn't think that the PR is rebaseable! HOT 2
- Can we use `equal` function to check the comment intead of `contain` func
- link in README broken HOT 1
- Inconsistency of latest version between GitHub Release and GitHub Marketplace Release
- Do not fail when PR is not rebaseable HOT 1
- Error: /entrypoint.sh: line 63: my_github_username_TOKEN: invalid variable name HOT 3
- GitHub doesn't think that the PR is rebaseable! HOT 7
- README: which permissions required for Personal Access Token?
- Create a new release HOT 2
- Automatically delete comment after rebasing HOT 1
- action is skipped, why? HOT 2
- Checkout repo in a custom path HOT 3
- Minimum level of permissions HOT 2
- Rebase fails in YOLOv5 HOT 1
- Rebase fails on forks
- /entrypoint.sh: line 83: 94dreamer_TOKEN: invalid variable name
- FYI: The official feature is released
- Docker Action run completed with exit code 3
- Cannot rebase because of Github security issue HOT 4
- Workflow defined in readme failing: Required property is missing: runs-on HOT 2
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 rebase.