Releases: aormsby/Fork-Sync-With-Upstream-action
v3.4.1
What's Changed
- Bump node v16 to v20
- Revise parts of README and wiki
- Add USERS.md for community to share projects
Please consider sharing some information to help guide any further development. Fork Sync - Developer Survey
v3.4 - bumps/fixes
Changes:
- Bump from
node12
tonode16
- thanks to @GCS-ZHN - Update the ouptut command for
HAS_NEW_COMMITS
- thanks to @PeterVoronov - Fix incorrect token used during push step - thanks to @PeterVoronov
Bump @actions/core
Security update - bump @actions/core from 1.4.0 to 1.9.1
v3.3 - Fix var name and step output commands
Some nice fixes from Fork Sync users. 🙂
PR #50
- Fix variable name to match the docs -- INPUT_TARGET_PUSH_ARGS ---> INPUT_TARGET_BRANCH_PUSH_ARGS
- Thanks @endocrimes and @kousu for calling this out
PR #48
- Fix - Output for
has_new_commits
was not properly set if fetching from upstream resulted in error - Thanks @Fubuchi for the PR
PR #40
- typo fix, thanks @corneliusroemer
v3.2 - Improve new commit check and fix 'first sync' shallow issue
(From PR #38)
Previously, the action checked for new commits rather naively by comparing the heads of the target and upstream branches and looking for a difference. However, that didn't account for the situation where the target branch has new commits unrelated to syncing.
Now, the action loops through all of the commit hashes since the last sync (actually, going back to the shallow_since time), and does a more thorough check to see if a new sync is needed or not.
shallow_since
input var was added with default 1 month ago- An unshallow operation was added to deal with 'first sync' situations
- Commit log output was improved
v3.1 - Update git config behavior
Previously, git config was always set by this action. Now it occurs only when the git config values haven't already been set by other workflow steps. This is to allow work with other actions and avoid setting conflicting config values.
Bonus: Now you can do neat things like setting up GPG commit signing with other actions like this -- https://github.com/aormsby/Fork-Sync-With-Upstream-action/wiki/GPG-Signing
v3.0 - Action Rewrite with TEST MODE
Hey folks! v3 is here!!!
Backstory: People had a bunch of issues with v2, particularly the problem of accessing private repos. It wasn't clear what the problems were, so I decided to rewrite the action and break each section into its own script. The private repo problem was solved and described in the new wiki pages. (The issue was fixed in v2.4 also.)
Please note that I renamed many variables in v3 to make their function more clear.
New - TEST MODE
Test mode runs a separate set of scripts (instead of the normal action) and verifies that your setup is correct. It checks if your input branches exist, if your upstream repo exists, if you have access to the upstream repo, and if your git config is setting and resetting properly. I guarantee that if you use test mode you'll spot problems with repo access before you run the action for real.
I also made a wiki with all of the tricky setup details, so if you're having trouble please check that out.
Fixes for private repos
Previous versions were not properly handling private repo access because of a misunderstanding in how the Github checkout action works. This is fixed by adding the input var target_repo_token
to store the environment variable secrets.GITHUB_TOKEN
Sample use--
steps:
- name: Checkout target repo
uses: actions/checkout@v2
with:
ref: my-target-branch
persist-credentials: false # not needed for public upstream, but fine to keep
- name: Sync upstream changes
id: sync
uses: aormsby/[email protected]
with:
target_branch: my-branch
upstream_branch: main
upstream_repository: your-name/your-repo
github_token: ${{ secrets.UPSTREAM_TOKEN }}
target_repo_token: ${{ secrets.GITHUB_TOKEN }}
See [wiki setup notes](https://github.com/aormsby/Fork-Sync-With-Upstream-action/wiki/Configuration#setup-notes for more details. (Note: the wiki is for v3, so the input vars are named differently. Same config, though.)
Other additions:
domain
input for repos in different domains- some typo fixes
This is the final update for v2.
v2.3
Bug fix - User/email config vars were swapped by accident in the previous release. Back to normal now.
v2.2 - Better Git Config
- Added
git_pull_rebase_config
(default false) to get rid of git warnings during the pull process - All git config credentials -
git_user
,git_email
,git_pull_rebase_config
- can be set to 'null' to use existing config data in the runner environment - Removed input for
git_config_credentials
- changes related to the above item made this input unnecessary - Updated actions/core package (security)
Also, the README now has some new on the action's intended use case as well as possible options for other situations. Hopefully, this will help avoid confusion and provide possible options when the action fails to merge a divergent branch (as intended).