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

Should I create reg_actions branch manually? #103

Closed
heavenshell opened this issue Nov 26, 2023 · 3 comments
Closed

Should I create reg_actions branch manually? #103

heavenshell opened this issue Nov 26, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@heavenshell
Copy link

Hello, Thank you for create nice GitHub actions.
I have been a long time user of reg-suit and it works great for me.

However I found your blog post and want to try reg-actions.
I set it up while reading the README, but got the following error.

/usr/bin/git fetch -u origin reg_actions:reg_actions
fatal: couldn't find remote ref reg_actions
Failed to fetch target branch, probably doesn't exist
Error: Command 'git' failed with args 'fetch -u origin reg_actions:reg_actions': fatal: couldn't find remote ref reg_actions
: Error: The process '/usr/bin/git' failed with exit code 128
    at /home/runner/work/_actions/reg-viz/reg-actions/v2/webpack:/reg-actions/lib/git.js:36:1
    at Generator.throw (<anonymous>)
    at rejected (/home/runner/work/_actions/reg-viz/reg-actions/v2/webpack:/reg-actions/lib/git.js:6:1)
Checking if branch reg_actions exists already
/usr/bin/git branch --list reg_actions
reg_actions does not exist, creating as orphan
/usr/bin/git checkout --orphan reg_actions
Switched to a new branch 'reg_actions'
Updating branch reg_actions
Removing all files from target branch
PassThrough {
  _readableState: ReadableState {
    state: 6161,
    highWaterMark: 65536,
    buffer: BufferList { head: null, tail: null, length: 0 },
    length: 0,
    pipes: [],
    flowing: null,
    errored: null,
    defaultEncoding: 'utf8',
    awaitDrainWriters: null,
    decoder: null,
    encoding: null,
    [Symbol(kPaused)]: null
  },
  _events: [Object: null prototype] {
    prefinish: [Function: prefinish],
    unpipe: [ [Function (anonymous)], [Function: onunpipe] ],
    error: [Function: onerror],
    close: [ [Function], [Function] ],
    finish: [Function: bound onceWrapper] { listener: [Function: onfinish] },
    end: [Function: bound onceWrapper] { listener: [Function (anonymous)] }
  },
  _eventsCount: 6,
  _maxListeners: 0,
  _writableState: WritableState {
    state: 802925,
    highWaterMark: 65536,
    defaultEncoding: 'utf8',
    length: 0,
    corked: 0,
    onwrite: [Function: bound onwrite],
    writecb: null,
    writelen: 0,
    afterWriteTickInfo: null,
    buffered: [],
    bufferedIndex: 0,
    pendingcb: 0,
    errored: null,
    [Symbol(kOnFinished)]: []
  },
  allowHalfOpen: true,
  add: [Function: addStream],
  [Symbol(kCapture)]: false,
  [Symbol(kCallback)]: null
}
Copying all files
/usr/bin/git add -A .
/usr/bin/git commit -m Update reg_actions to output generated at runId:6996055543
[reg_actions (root-commit) c75990c] Update reg_actions to output generated at runId:6996055543
 3 files changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 2023-11-26_6996055543_reg/actual/Regression.png
 create mode 100644 2023-11-26_6996055543_reg/diff/Regression.png
 create mode 100644 2023-11-26_6996055543_reg/expected/Regression.png
Pushing
/usr/bin/git rebase origin/reg_actions
fatal: invalid upstream 'origin/reg_actions'
/usr/bin/git rebase origin/reg_actions
fatal: invalid upstream 'origin/reg_actions'
/usr/bin/git rebase origin/reg_actions
fatal: invalid upstream 'origin/reg_actions'
/usr/bin/git rebase origin/reg_actions
fatal: invalid upstream 'origin/reg_actions'
/usr/bin/git rebase origin/reg_actions
fatal: invalid upstream 'origin/reg_actions'

/home/runner/work/_actions/reg-viz/reg-actions/v2/webpack:/reg-actions/lib/git.js:6
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
^
Error: Command 'git' failed with args 'rebase origin/reg_actions': fatal: invalid upstream 'origin/reg_actions'
: Error: The process '/usr/bin/git' failed with exit code 128
    at /home/runner/work/_actions/reg-viz/reg-actions/v2/webpack:/reg-actions/lib/git.js:36:1
    at Generator.throw (<anonymous>)
    at rejected (/home/runner/work/_actions/reg-viz/reg-actions/v2/webpack:/reg-actions/lib/git.js:6:1)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)

According to the error message, it seems that git is making an error because the reg_actions branch is missing.
Do I need to create the reg_actions branch beforehand?

If so, would I just create a reg_actions branch and push it?

git switch -c reg_actions
git push origin reg_actions

It would be helpful if you could add it to the README instructions.

Here is my test repository.
https://github.com/heavenshell/ts-reg-actions

I just setup storybook, storycap and reg-actions to main branch and I create new pull request.
Full action log is here.
https://github.com/heavenshell/ts-reg-actions/actions/runs/6996055543/job/19031541035

Thank you!

@bokuweb
Copy link
Member

bokuweb commented Nov 27, 2023

@heavenshell Thanks for your report!
I implemented it so that the reg_actions branch would be automatically created if it does not exist. However, if that is not the case, it might be a bug. I will investigate.

@bokuweb bokuweb mentioned this issue Nov 27, 2023
@bokuweb
Copy link
Member

bokuweb commented Nov 27, 2023

@heavenshell I fixed it by #104. How about this?

@heavenshell
Copy link
Author

@bokuweb
Thank you very much for your quick response.
I have confirmed that it has been fixed 🎉

Great and have a nice week!

@bokuweb bokuweb added the bug Something isn't working label Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants