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

Upgrade checkout to v1.1.0 to better support scripting git. #56

Merged
merged 5 commits into from
Oct 25, 2019

Conversation

TingluoHuang
Copy link
Member

https://github.com/github/dreamlifter/issues/1297

Checkout will persist the git credential into the repository git config file.

If the token has write-access to the repository, workflow user can use

- run: |
     git commit -am "changes"
     git push

to push the change back to the repository without dealing with git authentication.

@peter-evans
Copy link
Contributor

peter-evans commented Oct 16, 2019

I'm very interested to know how this is implemented.

  • What will be the default user.name and user.email set in git config? Will that vary depending on the event type?
  • For most event types I'm guessing refs/heads/<branch> will be checked out. What will happen for on: pull_request workflows? In checkout@v1 it creates a merge commit. To avoid that commit being pushed I'm checking out github.head_ref which destroys the merge commit. After thinking about this a bit more I guess the behaviour won't change. I will still need to checkout github.head_ref instead of the merge commit.

README.md Outdated Show resolved Hide resolved
@thboop
Copy link
Contributor

thboop commented Oct 24, 2019

Hey @peter-evans!

I'm very interested to know how this is implemented.

We are working on making this more transparent!

  • What will be the default user.name and user.email set in git config? Will that vary depending on the event type?

There's an open feedback ticket here for that functionality, we'd love for you to chime in on what would help you build the best workflows.!

To clarify, this pr sets neither the email or name, in order to push you will need to set those using the appropriate git commands

  • For most event types I'm guessing refs/heads/<branch> will be checked out. What will happen for on: pull_request workflows? In checkout@v1 it creates a merge commit. To avoid that commit being pushed I'm checking out github.head_ref which destroys the merge commit. After thinking about this a bit more I guess the behaviour won't change. I will still need to checkout github.head_ref instead of the merge commit.

We haven't made any changes to what is checked out, but it should be a little easier for you to checkout or fetch something you may need without doing extra work to auth!

@thboop thboop merged commit 0b496e9 into master Oct 25, 2019
@thboop thboop deleted the users/tihuang/checkoutV1_1 branch October 25, 2019 14:56
wingrunr21 added a commit to wingrunr21/homebrew-xlights that referenced this pull request Nov 3, 2019
thboop added a commit that referenced this pull request Nov 4, 2019
Copy link

@randydwhitephotography randydwhitephotography left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ugrade

Copy link

@randydwhitephotography randydwhitephotography left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

signed-off-by Randy D White randydwhite@randydwhite.com signed-off-by Randy D White randydwhite@randydwhite.com

Copy link

@randydwhitephotography randydwhitephotography left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

signed-off-by Randy D White randydwhite@randydwhite.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants