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

Create or update a file for follow up pull requests #1799

Open
suzuki-shunsuke opened this issue Sep 19, 2024 · 3 comments · May be fixed by #1801
Open

Create or update a file for follow up pull requests #1799

suzuki-shunsuke opened this issue Sep 19, 2024 · 3 comments · May be fixed by #1801
Labels
enhancement New feature or request
Milestone

Comments

@suzuki-shunsuke
Copy link
Owner

suzuki-shunsuke commented Sep 19, 2024

Feature Overview

https://suzuki-shunsuke.github.io/tfaction/docs/feature/follow-up-pr

Enable you to create or update a file to create a follow up pull request.

Why is the feature needed?

tfaction creates an empty commit to create a follow up pull request, but if you use path filters an empty commit doesn't trigger a workflow run.
To solve this issue, we want to create or update a file in the working directory instead of empty commit.

Example Code

tfaction-root.yaml

create_follow_up_pr:
  create_file: true

.tfaction-follow-up

# This file is created and updated for follow up pull requests.
# You can remove this file safely.
https://github.com/suzuki-shunsuke/tfaction-example/actions/runs/10911798341 # Insert workflow URL to update file.

Note

No response

@suzuki-shunsuke suzuki-shunsuke added the enhancement New feature or request label Sep 19, 2024
@suzuki-shunsuke
Copy link
Owner Author

suzuki-shunsuke commented Sep 19, 2024

Why not updating tfaction.yaml instead of .tfaction-follow-up?

I considered adding a newline to tfaction.yaml instead of .tfaction-follow-up, but if you configure CODEOWNERS to tfaction.yaml, it's bad to update tfaction.yaml to create a follow up pull request because the codeowner of tfaction.yaml needs to review the pull request.
tfaction.yaml allows you to configure sensitive settings, so teams such as SRE and Security may be codeowners of tfaction.yaml.

@suzuki-shunsuke suzuki-shunsuke changed the title Create or update a file to create a follow up pull request Create or update a file for follow up pull requests Sep 19, 2024
@suzuki-shunsuke
Copy link
Owner Author

@suzuki-shunsuke
Copy link
Owner Author

Remove the setting and change the default behavior

I considered adding the setting and kept the default behavior, but I changed my mind that we can change the default behavior instead of adding the setting.
This makes tfaction simple.

@suzuki-shunsuke suzuki-shunsuke added this to the v1.6.0 milestone Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant