Closed nahtnam closed 7 months ago
Hi @nahtnam and thank you for your question.
To ignore changes for a whole file you can use a .templatesyncignore file https://github.com/AndreasAugustin/actions-template-sync#ignore-files
If you want to have some changes ignored: The action uses git and the history. That means you actually need the change commit within your SaaS repository or it will always give you a change PR. The following should work:
Not super sure how you reverted the change, but I think that workflow should work.
Interesting, I think I was doing that. I was using git revert
to create an extra commit, so the original commit was in the history. I did a standard merge (no squash or rebase) but still was facing the problem
I ended up just cloning the repo so that they had the same history and am syncing manually for now
Interesting, I think I was doing that. I was using
git revert
to create an extra commit, so the original commit was in the history. I did a standard merge (no squash or rebase) but still was facing the problemI ended up just cloning the repo so that they had the same history and am syncing manually for now
Hmmm 🤔 weird. I will think about it. Actually within src/sync_template.sh
line 62
git cat-file -e "${TEMPLATE_REMOTE_GIT_HASH}" || COMMIT_NOT_IN_HIST=true
if [ "$COMMIT_NOT_IN_HIST" != true ] ; then
warn "repository is up to date!"
exit 0
fi
It is checked if the remote got hash is within the history. It also respects squash commits. @nahtnam not sure why in your case this did not work. Is your code somewhere public? Can you please also add the version of the action you are using?
Will try to rebuild your issue within the next days.
Describe the documentation issue
I have a question surrounding my use case:
There were some issues with my template so I made the changes in both repos and pushed it. For example in the template repo I put
const companyName = "template"
and in the saas repo I putconst companyName = "saas"
. A day later, I got a PR in the "saas" repo to change thecompanyName
totemplate
, even though I already set it tosaas
. I want to ignore this change and only sync future changes so I checked out thetemplate_sync_xxxxxxx
branch, reverted the commit, and merged the empty PR. However a day later I got the exact same PR. Any way to avoid this?Links
N/A
Acknowledgements