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

change: add basic pr label #434

Merged
merged 1 commit into from
Mar 13, 2025
Merged

change: add basic pr label #434

merged 1 commit into from
Mar 13, 2025

Conversation

rdhar
Copy link
Member

@rdhar rdhar commented Mar 5, 2025

Resolves #432.

Following on from #432, TF-via-PR currently makes a best-effort at checking if a PR label exists before creating it with a description and colour (5C4EE5).

However, on the very first run, this results in a suppressed error as it can't retrieve a PR label which doesn't exist yet, which can be confusing to new-users.

To "fix", TF-via-PR could simply not add a description or color, and just attach the "default" PR label with appropriate name (e.g., "tf:plan" or "tf:apply".

Changed

Signed-off-by: Rishav Dhar <[email protected]>
@github-actions github-actions bot added tf:plan Pull requests that plan TF code labels Mar 5, 2025
Copy link

github-actions bot commented Mar 5, 2025

tofu fmt -chdir=tests/fail_format_diff -check -diff -recursive
View output.
By rdhar at 2025-03-13T09:46:23Z (view log).
main.tf
--- old/main.tf
+++ new/main.tf
@@ -1,3 +1,3 @@
 resource "random_pet" "name" {
-  count =1
+  count = 1
 }

Copy link

github-actions bot commented Mar 5, 2025

tofu validate -chdir=tests/pass_one
Success! The configuration is valid.
By rdhar at 2025-03-13T09:46:23Z (view log).
Success! The configuration is valid.

Copy link

github-actions bot commented Mar 5, 2025

tofu validate -chdir=tests/fail_data_source_error
Success! The configuration is valid.
By rdhar at 2025-03-13T09:46:23Z (view log).
Success! The configuration is valid.

Copy link

github-actions bot commented Mar 5, 2025

tofu validate -chdir=tests/fail_invalid_resource_type
Error: Invalid resource type
By rdhar at 2025-03-13T09:46:23Z (view log).
Error: Invalid resource type

  on main.tf line 1, in resource "random_pets" "name":
   1: resource "random_pets" "name" {

The provider hashicorp/random does not support resource type "random_pets".
Did you mean "random_pet"?

Copy link

github-actions bot commented Mar 5, 2025

tofu validate -chdir=tests/pass_character_limit
Success! The configuration is valid.
By rdhar at 2025-03-13T09:46:23Z (view log).
Success! The configuration is valid.

@rdhar rdhar merged commit 8edfc59 into main Mar 13, 2025
2 checks passed
@rdhar rdhar deleted the change--add-basic-pr-label branch March 13, 2025 09:46
@github-actions github-actions bot added the tf:apply Pull requests that apply TF code label Mar 13, 2025
@rdhar rdhar modified the milestones: v13.2.0, v13.1.5 Mar 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tf:apply Pull requests that apply TF code tf:plan Pull requests that plan TF code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error when labeling PR
1 participant