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

Then statements to add files and make a commit to a local git repository #219

Open
jaromil opened this issue Dec 12, 2022 · 4 comments
Open
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@jaromil
Copy link
Member

jaromil commented Dec 12, 2022

Then I add the file named by 'first_file' to the git repository '/var/run/w3c_did/repo'
and I add the file '/var/run/w3c_did/repo/second_file' to the git repository named by 'w4c_did_repo'
and I commit to the git repository named by 'w4c_did_repo' using the comment in string 'my_comment'

Statements may possibly work both with hard-coded values (paths to files and repo and comment) as well with values in HEAP.
The goal is to be able to add and modify files in a git repository and commit changes with a comment from Zencode.

@jaromil jaromil added enhancement New feature or request help wanted Extra attention is needed labels Dec 12, 2022
@puria
Copy link
Member

puria commented Dec 12, 2022

@albertolerda
Copy link
Member

albertolerda commented Dec 15, 2022

For a commit it is also required the author and its email, should I change

Then I commit to the git repository '...' using the comment in string '..' by 'author' with email 'author_email'

We can also introduce a statement

Given the git author '' with email ''

which sets email and author as global for the whole script

@puria
Copy link
Member

puria commented Dec 15, 2022

For a commit it is also required the author and its email, should I change

Then I commit to the git repository '...' using the comment in string '..' by 'author' with email 'author_email'

We can also introduce a statement

Given the git author '' with email ''

which sets email and author as global for the whole script

Can we do that email/username is the one saved in the system... like... by default is run via restroom <[email protected]> maybe configurable via ENV VARS?

@jaromil does this make sense? To fill others repository restroom commits, and make aware that are automatic commits... ????

@jaromil
Copy link
Member Author

jaromil commented Dec 15, 2022

Just like in some statements we expect the existence of data, in this case, we can expect the existence of a configured git repository in Given and the existence of a dictionary describing all git commit fields

Given I have a git repository in 'path/to/repo` # checks .git

... Zenroom's zencode to create a dictionary in the form:
commit = { author, email, comment, files = [ ... ] }

Then I make a new commit to the git repository in 'path/to/repo'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants