Skip to content

Support importing posts - #88

Merged
mAAdhaTTah merged 15 commits into
masterfrom
support-importing-posts
Sep 26, 2015
Merged

mAAdhaTTah merged 15 commits into
masterfrom
support-importing-posts

Conversation

@mAAdhaTTah

Copy link
Copy Markdown
Owner

Fixes #61. Fixes #4.

This works, so far, but handling the issues raised by #4 continues to be an issue. Generally speaking, I'm not loving the way we're handling authors overall. I'm wondering if maybe we should add a settings for a "default author" to be used in case the author isn't found. Overall, this may require some additional refactoring; I may push some things down from the main plugin class into the controller, and have the controller decide whether to fire the additional export.

This function name is more descriptive.
Currently, this doesn't properly handle revision and commit authors.
@mAAdhaTTah mAAdhaTTah added this to the 1.3 milestone Sep 20, 2015
Some of these changes are simple code style changes, but a bunch of them are changes to the way we do the translation strings, subbing in `sprintf` instead of just concatenating strings.
And validate we actually have an integer for the user.
Export object keeps track of all the posts updated + added. For each of these IDs, the controller will set the proper author for the latest revision as well as new posts.
@mAAdhaTTah
mAAdhaTTah force-pushed the support-importing-posts branch from c14038f to 3e52210 Compare September 20, 2015 02:54
@mAAdhaTTah

Copy link
Copy Markdown
Owner Author

I don't know what's going on with Travis, but I've got this working locally. There are definitely some things I'd like to modify about the way this deals with the authors, as well as add unit tests, but this could use a lookover + some testing.

The covers documentation for the new importing feature.
@mAAdhaTTah
mAAdhaTTah force-pushed the support-importing-posts branch from f305b4d to b834a58 Compare September 25, 2015 03:23
@mAAdhaTTah mAAdhaTTah mentioned this pull request Sep 25, 2015
2 tasks
@mAAdhaTTah

Copy link
Copy Markdown
Owner Author

I think this is ready to go. Planning on merging and deploying this weekend.

This provides flexibility to the user in how the revision and imported post users get set.
@mAAdhaTTah
mAAdhaTTah force-pushed the support-importing-posts branch from e0ab1d1 to 3c43588 Compare September 26, 2015 19:12
@mAAdhaTTah

Copy link
Copy Markdown
Owner Author

Updated the way we're handling authors now. The user can set a default user that WPGHS falls back to when searching for a user fails. Updated the documentation to reflect this change.

mAAdhaTTah added a commit that referenced this pull request Sep 26, 2015
@mAAdhaTTah
mAAdhaTTah merged commit 8c4f7f1 into master Sep 26, 2015
@mAAdhaTTah
mAAdhaTTah deleted the support-importing-posts branch September 26, 2015 19:34
@sivyel

sivyel commented Jun 1, 2020

Copy link
Copy Markdown

how to remove sync for old posts in the repo when first time configure. Which hook need to remove ?

@mAAdhaTTah

Copy link
Copy Markdown
Owner Author

@sivyel This should match up posts with their post IDs, if they're aligned between what's in the repo & in the database.

@sivyel

sivyel commented Jun 1, 2020

Copy link
Copy Markdown

@mAAdhaTTah Actually i'm not using sync process one time push from git to wordpress is enough. If you can help me to sync only one post what we commit from git. Don't sync other existing files from git. Can you help me in that?

@mAAdhaTTah

Copy link
Copy Markdown
Owner Author

It won't import anything that doesn't have a post front matter, so the rest of the files shouldn't interfere.

@sivyel

sivyel commented Jun 1, 2020

Copy link
Copy Markdown

@mAAdhaTTah Rest of the files also have frontmatter format only

@mAAdhaTTah

Copy link
Copy Markdown
Owner Author

Not entirely sure this is possible, tbh. I'd have to dig into it.

@sivyel

sivyel commented Jun 1, 2020

Copy link
Copy Markdown

@mAAdhaTTah can you help on this, only commit which i did need to sync other than existing don't consider

@mAAdhaTTah

Copy link
Copy Markdown
Owner Author

Unfortunately, no, I don't really have the time generally and have moved on to other open source projects.

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.

Support Importing Posts from GitHub Set revision author on update on the WordPress side

2 participants