-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add function that retrieves the file contents * add tests for retrieving content of a file * remove unnecessary None alternative * make repository client available to reconcile * add content from default branch to content change * add merge conflict module * add tests for content module * add module that checks actions * add check for any content conflicts * add reconcile test with merge conflicts * add content merging * separate action tests into multiple modules * add github token to e2e tests * move requirements to requirements.txt files * add support for the case where the file was not found on the branch * add tests for no base * add support for retrieving the file from a particular branch * add base branch input * add tests for that file is retrieved from the correct branch * add integration test for merge conflict * update docs * aggregate clients into a tuple * add update e2e test * move writing GitGHub output to separate module
- Loading branch information
1 parent
046a6c0
commit 69bfd6d
Showing
43 changed files
with
2,895 additions
and
1,193 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
ops | ||
pytest-operator | ||
factory_boy>=3.2,<3.3 | ||
pytest-asyncio>=0.21,<0.22 | ||
pytest>=7.2,<7.3 | ||
juju==3.0.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Copyright 2023 Canonical Ltd. | ||
# See LICENSE file for licensing details. | ||
|
||
"""Functions that support writing output.""" | ||
|
||
import os | ||
from pathlib import Path | ||
|
||
|
||
def write(text: str) -> None: | ||
"""Write text to the GitHub output file. | ||
Args: | ||
text: The content to write to the GitHub output. | ||
""" | ||
github_output = os.getenv("GITHUB_OUTPUT") | ||
assert github_output, ( | ||
"the GITHUB_OUTPUT environment variable is empty or defined, " | ||
"is this running in a GitHub workflow?" | ||
) | ||
output_file = Path(github_output) | ||
output_file.write_text(text, encoding="utf-8") |
Oops, something went wrong.