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

Feature: Migrate docs #32

Merged
merged 109 commits into from
Jan 12, 2023
Merged

Feature: Migrate docs #32

merged 109 commits into from
Jan 12, 2023

Conversation

yanksyoon
Copy link
Contributor

@yanksyoon yanksyoon commented Dec 30, 2022

This feature is intended to be run at initial docs-migration stage, to later use git as the upstream source for documentation on discourse and/or charmhub.

Key features

  • It is backwards compatible with the existing reconcile mode since it accepts github_token as an optional parameter.
  • It supports custom branch name support to allow branch names other than the default upload-charm-docs.

Moving forward

Further partial PR can be supported for better UX, where a partial PR would contain migrations of successful files. This enhancement should include successful files migration, failed files logging and explicit user notification of failed migrations(related issue: #33 ).

To note

dry_run parameter has no effect.

Examples

Example run on indico-operator, Generated PR link

Example dry mode run on indico-operator.

Edit:

  • Removed custom branch name support to simplify PR.

arturo-seijas
arturo-seijas previously approved these changes Jan 10, 2023
Copy link
Contributor

@arturo-seijas arturo-seijas left a comment

Choose a reason for hiding this comment

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

LGTM

gtrkiller
gtrkiller previously approved these changes Jan 10, 2023
Copy link

@gtrkiller gtrkiller left a comment

Choose a reason for hiding this comment

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

LGTM

@yanksyoon yanksyoon marked this pull request as ready for review January 11, 2023 01:05
src/migration.py Outdated Show resolved Hide resolved
src/migration.py Outdated Show resolved Hide resolved
src/migration.py Show resolved Hide resolved
src/types_.py Outdated Show resolved Hide resolved
tests/unit/test_pull_request.py Outdated Show resolved Hide resolved
@yanksyoon yanksyoon dismissed stale reviews from gtrkiller and arturo-seijas via 8d4896e January 11, 2023 08:20
jdkandersson
jdkandersson previously approved these changes Jan 12, 2023
Copy link
Contributor

@jdkandersson jdkandersson left a comment

Choose a reason for hiding this comment

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

Nice, thanks for improving the code with all the feedback!

requirements.txt Outdated Show resolved Hide resolved
@github-actions
Copy link

Test coverage for 9547a6c

Name                      Stmts   Miss Branch BrPart  Cover   Missing
---------------------------------------------------------------------
src/__init__.py              42      0      6      0   100%
src/action.py               119      0     32      0   100%
src/discourse.py            133      0     30      0   100%
src/docs_directory.py        29      0      8      0   100%
src/exceptions.py            11      0      0      0   100%
src/index.py                 30      0      6      0   100%
src/metadata.py              28      0     12      0   100%
src/migration.py            106      0     35      0   100%
src/navigation_table.py      52      0     16      0   100%
src/pull_request.py          86      0     12      0   100%
src/reconcile.py             66      0     34      0   100%
src/types_.py               122      0     24      0   100%
---------------------------------------------------------------------
TOTAL                       824      0    215      0   100%

Static code analysis report

Run started:2023-01-12 09:33:42.945554

Test results:
  No issues identified.

Code scanned:
  Total lines of code: 7746
  Total lines skipped (#nosec): 17
  Total potential issues skipped due to specifically being disabled (e.g., #nosec BXXX): 0

Run metrics:
  Total issues (by severity):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
  Total issues (by confidence):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
Files skipped (0):

Copy link
Contributor

@arturo-seijas arturo-seijas left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

@merkata merkata left a comment

Choose a reason for hiding this comment

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

Great work!

@yanksyoon yanksyoon merged commit 87a0d46 into main Jan 12, 2023
@yanksyoon yanksyoon deleted the feature/migration branch January 12, 2023 12:10
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.

6 participants