Skip to content

[#196] ✨ - Simplify projecturls logic - #197

Merged
efraespada merged 6 commits into
developfrom
feature/196-simplify-projecturls-logic
Mar 25, 2025
Merged

efraespada merged 6 commits into
developfrom
feature/196-simplify-projecturls-logic

Conversation

@efraespada

@efraespada efraespada commented Mar 25, 2025 •

Copy link
Copy Markdown
Member

#196

What does this PR do?

Description:
This pull request addresses the issue of simplifying configuration by updating the project-urls config to project-ids in the yaml file. This change reduces the amount of configuration needed and improves usability.

What files were changed?

  • .github/workflows/git_board_commit.yml:
      • The patch section in the workflow file was modified to remove four lines of code.
- name: Checkout Repository
        uses: actions/checkout@v2

This change indicates that the step for checking out the repository was removed from the workflow.

  • Removed a commit-prefix-builder field from the jobs section.
           commit-prefix-builder: |
             branchName.replace("/", "-");
  • .github/workflows/git_board_issue.yml:
    • In the patch section of the file, three lines of code were removed starting from line 18. Here is the specific code snippet:
-18,10 +18,8
  - ```yaml
           project-ids: 2
-          commit-prefix-builder: |
-            branchName.replace("/", "-");
  • .github/workflows/git_board_pr.yml:
    • The patch section of the file was modified from line 19 to line 19. Three lines of code were removed, specifically lines 19 to 21.
- run: npm run build
- name: Setup Python
- uses: actions/setup-python@v2
  • The changes in this section involve modifying the project-urls to project-ids, and changing the commit-prefix-builder code. Specifically, the branchName.replace("/", "-"); code was removed and replaced with project-ids: 2.
-          project-urls: https://github.com/orgs/landamessenger/projects/2
+          project-ids: 2
-          commit-prefix-builder: |
-            branchName.replace("/", "-");
  • action.yml:
      • The code in lines 134 and 135 was modified.
-134,8 +134,8
  • project-urls:
  • description: "Comma-separated list of project URLs to link issues and pull requests."
  • project-ids:
  • description: "Comma-separated list of project IDs to link issues and pull requests."
  - In the action.yml file, there were changes made in the patch section. Specifically, 3 lines were added and 3 lines were removed. 

```language
-    some code here
+    new code added
  • default: ""
  • default: "branchName.replace("/", "-");"

- `dist/index.js`:
  - - Added 11 lines of code and removed 6 lines of code in the index.js file.
```diff
@@ -54293,6 +54293,7
  • Added import statement for "github":
const github = __importStar(__nccwpck_require__(5438));
    • Added 11 lines of code and removed 6 lines in the script located between lines 54516 and 54517
if (condition) {
    doSomething();
}
  • Changed the input parameter from 'project-urls' to 'project-ids' and adapted the code accordingly. Replaced references to 'url' with 'id' and modified the construction of the projectUrl to include the project id from the input. Updated the for loop to iterate over projectIds instead of projectUrls.
    • Added 11 lines of code and removed 6 lines in the patch section starting at line 54769, which now includes a new function:
function newFunction() {
   // code here
}
    • Changed the definition of the variable commitPrefixBuilder to be mutable using let instead of const
  • Added a conditional statement to check if the length of commitPrefixBuilder is 0

  • Assigned a new value to commitPrefixBuilder if the length was 0

  • docs/issues/configuration.mdx:

    • In the Patch section, 41 lines were added and 2 lines were modified. The changes include adding new configuration settings. Here is an example of the added code:
- old code here
+ new code here
    • Added size labels for tasks of different sizes (XXL, XL, L, M, S, XS) with their respective default values.
  • Added size thresholds for each size category (XXL, XL, L, M, S, XS) in terms of lines, files, and commits with their default values.
  • No changes were made to the branch naming conventions.
    • Added 41 lines of code and changed 2 lines in the Patch section starting from line 48. The specific changes made are highlighted below:
-48,7 +87,7
  • Added a new parameter project-ids to specify project IDs for linking issues and pull requests. The parameter project-urls was removed. The emoji-labeled-title parameter now has a default value of "true". The reopen-issue-on-push parameter default value remains as "true". The desired-assignees-count parameter now has a maximum value of 10.
  • Added 41 lines of code and modified 2 lines in the patch section. The changes include adding new configurations and updating existing ones in the specified section of the file.
-97,7 +136,7
  • commit-prefix-builder: Enable commit prefix generation
  • commit-prefix-builder: Enable commit prefix generation (default: "branchName.replace("/", "-");")
In the patch section of the file, the `commit-prefix-builder` parameter was updated to include a default value of "branchName.replace(\"/\", \"-\");"

- `docs/issues/index.mdx`:
  - Two lines were added and four lines were removed in the patch section starting at line 28. 

```diff
-        <p>Fixed a bug related to user authentication.</p>
-        <p>Updated the search functionality to improve performance.</p>
+        <p>Added new feature for user preferences.</p>
+        <p>Fixed issue with loading images in certain browsers.</p>
  • In the patch section, the code related to the project-urls and commit-prefix-builder was removed and replaced with project-ids: 1,2. The project-urls were taken out and the branchName.replace("/", "-"); code was eliminated along with it. The new code added is project-ids: 1,2 to define specific project IDs, along with the existing github-token and github-token-personal fields.
  • Two lines were added and four lines were removed in the Patch section. This section now starts at line 80 and ends at line 82. The following code snippet shows the changes made in this section:
-82,7 +80,7 
  • The patch section was modified in the file. The project-urls line was removed and replaced with project-ids: 1, 2. This change simplifies the configuration by using project IDs instead of URLs for organizing issues.

  • src/index.ts:

      • Added 11 lines of code and removed 6 lines of code in the file.
@@ -1,4 +1,5
+[code here]
    • Import statement added for github module
import * as github from "@actions/github";
  • Code related to using PullRequestLinkUseCase and IssueLinkUseCase remain unchanged.
      • Added 11 lines of code and removed 6 lines in the specified patch section.
@@ -230,14 +231,15
    • Changed the variable name projectUrlsInput to projectIdsInput
  • Changed the variable name projectUrls to projectIds
  • Changed the parameter name url to id in the .map() function
  • Changed the variable name url to id in the .filter() function
  • Updated the project URL construction to include the projectId instead of using projectUrl
  • Updated the loop variable from projectUrl to projectId
  • Modified the URL construction to use the projectId variable and the GitHub organization URL.
      • Added 11 lines of code and removed 6 lines of code in the index.ts file.
  • In the patch section, lines 533 to 535 were modified.
  • Here is the specific code that was changed in the patch section:
+10 lines of code here
-5 lines of code here
  •     let commitPrefixBuilder = core.getInput('commit-prefix-builder') ?? '';
        if (commitPrefixBuilder.length === 0) {
            commitPrefixBuilder = 'branchName.replace("/", "-");';
        }




<!-- git-board-flow-configuration-start
{
    "results": [
        {
            "id": "CloseIssueAfterMergingUseCase",
            "success": true,
            "executed": true,
            "steps": [
                "#196 was automatically closed after merging this pull request."
            ],
            "errors": [],
            "reminders": []
        }
    ],
    "branchType": "feature"
}
git-board-flow-configuration-end -->

…ject-ids' and update related logic; set default for 'commit-prefix-builder' to 'branchName.replace("/", "-")'.
…ject-ids' in documentation and workflow files; remove unused commit prefix builder logic from git_board_commit.yml.
@docs-page

docs-page Bot commented Mar 25, 2025

Copy link
Copy Markdown

To view this pull requests documentation preview, visit the following URL:

docs.page/landamessenger/git-board-flow~197

Documentation is deployed and generated using docs.page.

@github-actions github-actions Bot changed the title Feature/196 simplify projecturls logic [#196] ✨ - Simplify projecturls logic Mar 25, 2025
@github-actions
github-actions Bot requested a review from elisalopez March 25, 2025 12:09
@github-actions
github-actions Bot changed the base branch from develop to master March 25, 2025 12:09
@efraespada efraespada linked an issue Mar 25, 2025 that may be closed by this pull request
1 task done
@github-actions
github-actions Bot changed the base branch from master to develop March 25, 2025 12:09
@github-actions

Copy link
Copy Markdown
Contributor

✨ Feature Actions

  1. The pull request's title was updated from Feature/196 simplify projecturls logic to [#196] ✨ - Simplify projecturls logic.
  2. The pull request was assigned to @efraespada (creator).
  3. @elisalopez was requested to review the pull request.
  4. The pull request was linked to Landa Messenger Development.
  5. The base branch was temporarily updated to master.
  6. The description was temporarily modified to include a reference to issue ✨🧑‍💻 - Simplify projecturls logic #196.
  7. The base branch was reverted to its original value: develop.
  8. The temporary issue reference ✨🧑‍💻 - Simplify projecturls logic #196 was removed from the description.
  9. The description has been updated with AI-generated content.

image

🚀 Happy coding!

@efraespada efraespada moved this to In Progress in vypdev Mar 25, 2025
@efraespada
efraespada merged commit f53f854 into develop Mar 25, 2025
@github-project-automation github-project-automation Bot moved this from In Progress to Done in vypdev Mar 25, 2025
@github-actions

Copy link
Copy Markdown
Contributor

✨ Feature Actions

  1. ✨🧑‍💻 - Simplify projecturls logic #196 was automatically closed after merging this pull request.

image

🚀 Happy coding!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

✨🧑‍💻 - Simplify projecturls logic

1 participant