Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Action fails when a previous type update PR has not been merged #11

Open
alex-galey opened this issue Sep 30, 2022 · 4 comments
Open

Action fails when a previous type update PR has not been merged #11

alex-galey opened this issue Sep 30, 2022 · 4 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@alex-galey
Copy link
Contributor

Action fails when a previous type update PR has not been merged

@lyqht do you have an idea or should I file an issue upstream ?

Run stefanzweifel/git-auto-commit-action@v4
Started: bash /home/runner/work/_actions/stefanzweifel/git-auto-commit-action/v4/entrypoint.sh
INPUT_REPOSITORY value: .
INPUT_STATUS_OPTIONS: 
INPUT_FILE_PATTERN: db.types.ts
INPUT_BRANCH value: supabot/update-database-types
Switched to a new branch 'supabot/update-database-types'
M	db.types.ts
INPUT_ADD_OPTIONS: 
INPUT_FILE_PATTERN: db.types.ts
INPUT_COMMIT_OPTIONS: 
INPUT_COMMIT_USER_NAME: Supabot
INPUT_COMMIT_USER_EMAIL: github-actions[bot]@users.noreply.github.com
INPUT_COMMIT_MESSAGE: Update database types
INPUT_COMMIT_AUTHOR: Supabot <github-actions[bot]@users.noreply.github.com>
[supabot/update-database-types 84ddaa6] Update database types
 1 file changed, 6 insertions(+), 6 deletions(-)
INPUT_TAGGING_MESSAGE: 
No tagging message supplied. No tag will be added.
INPUT_PUSH_OPTIONS: 
To https://github.com/***
 ! [rejected]        HEAD -> supabot/update-database-types (non-fast-forward)
error: failed to push some refs to 'https://github.com/***'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
Error: Invalid status code: 1
    at ChildProcess.<anonymous> (/home/runner/work/_actions/stefanzweifel/git-auto-commit-action/v4/index.js:17:19)
    at ChildProcess.emit (events.js:314:20)
    at maybeClose (internal/child_process.js:1022:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) {
  code: 1
}
Error: Invalid status code: 1
    at ChildProcess.<anonymous> (/home/runner/work/_actions/stefanzweifel/git-auto-commit-action/v4/index.js:17:19)
    at ChildProcess.emit (events.js:314:20)
    at maybeClose (internal/child_process.js:1022:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)

Note I am using the action on push events :

name: Update database types
on:
  push:
    branches: [ main ]
    paths:
      - '*.sql'

jobs:
  build:
    if: github.head_ref != 'supabot**'
    runs-on: ubuntu-latest
@lyqht lyqht added bug Something isn't working hacktoberfest labels Oct 1, 2022
@lyqht
Copy link
Owner

lyqht commented Oct 1, 2022

Hello there @alex-galey , this issue existed even on the previous way of running this github action on a scheduled frequency. I believe it is because of the repo-sync/pull-request@v2 GH action doesn't override the existing PR. There's probably a way to add a new PR/ force an override of existing PR, but i haven't look into how to do it. If you would like to work on it, let me know!

@alex-galey
Copy link
Contributor Author

alex-galey commented Oct 1, 2022

Thanks for confirming the existence of this issue.

Seems it is known (and wanted) from git-auto-commit action :

"No support for git rebase or git merge. There are many strategies on how to integrate remote upstream changes to a local repository. git-auto-commit does not want to be responsible for doing that."

I will give a try of rebasing before PR

@alex-galey
Copy link
Contributor Author

Tried couple of things but I guess we need a git specialist here ^^
https://github.com/alex-galey/generate-supabase-db-types-github-action

@alex-galey
Copy link
Contributor Author

Also tried pulling before commit without succes :
stefanzweifel/git-auto-commit-action#229

@lyqht lyqht added help wanted Extra attention is needed enhancement New feature or request and removed bug Something isn't working labels May 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants