Skip to content

change: add basic pr label#434

Merged
rdhar merged 1 commit intomainfrom
change--add-basic-pr-label
Mar 13, 2025
Merged

change: add basic pr label#434
rdhar merged 1 commit intomainfrom
change--add-basic-pr-label

Conversation

@rdhar
Copy link
Copy Markdown
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 <19497993+rdhar@users.noreply.github.com>
@github-actions github-actions bot added tf:plan Pull requests that plan TF code labels Mar 5, 2025
@github-actions
Copy link
Copy Markdown

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
 }

@github-actions
Copy link
Copy Markdown

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.

@github-actions
Copy link
Copy Markdown

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.

@github-actions
Copy link
Copy Markdown

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"?

@github-actions
Copy link
Copy Markdown

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
rdhar added a commit that referenced this pull request Apr 14, 2025
Signed-off-by: Rishav Dhar <19497993+rdhar@users.noreply.github.com>
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