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

fix(gh-96): fix git token parsing #98

Merged
merged 1 commit into from
Feb 23, 2024

Conversation

lampajr
Copy link
Member

@lampajr lampajr commented Feb 23, 2024

Thank you for submitting this pull request

fixes #96

Description

Fix when Git tokens are parsed/fetched from the envrionment variables:

  • Moved the logic before the GitClient creation, inside the runner.
  • Now the PullRequestConfigsParser.parseAndValidate() assumes the args.auth has already the proper token setup.

Checklist

  • Tests added if applicable.
  • Documentation updated if applicable.

Note: dist/cli/index.js and dist/gha/index.js are automatically generated by git hooks and gh workflows.

First time here?

This project follows git conventional commits pattern, therefore the commits should have the following format:

<type>(<optional scope>): <subject>
empty separator line
<optional body>
empty separator line
<optional footer>

Where the type must be one of [build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test]

NOTE: if you are still in a work in progress branch and you want to push your changes remotely, consider adding --no-verify for both commit and push, e.g., git push origin <feat-branch> --no-verify - this could become useful to push changes where there are still tests failures. Once the pull request is ready, please amend the commit and force-push it to keep following the adopted git commit standard.

How to prepare for a new release?

There is no need to manually update package.json version and CHANGELOG.md information. This process has been automated in Prepare Release Github workflow.

Therefore whenever enough changes are merged into the main branch, one of the maintainers will trigger this workflow that will automatically update version and changelog based on the commits on the git tree.

More details can be found in package release section of the README.

Copy link
Contributor

github-actions bot commented Feb 23, 2024

Coverage report

St.
Category Percentage Covered / Total
🟢 Statements
90.81% (-0.31% 🔻)
425/468
🟢 Branches
84.18% (-0.51% 🔻)
165/196
🟢 Functions
88.24% (-1.6% 🔻)
105/119
🟢 Lines
90.75% (-0.36% 🔻)
412/454
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟢
... / pr-configs-parser.ts
95% (-0.65% 🔻)
97.73% (-0.1% 🔻)
100%
94.87% (-0.68% 🔻)
🟢
... / github-client.ts
85.42% (-2.08% 🔻)
69.23% (-7.69% 🔻)
64.29% (-7.14% 🔻)
85.11% (-2.13% 🔻)
🟢
... / gitlab-client.ts
93.75% (-1.25% 🔻)
83.33%
91.67% (-4.17% 🔻)
93.42% (-1.32% 🔻)
🟢 git/git-util.ts
94.74% (-5.26% 🔻)
88.24% (-11.76% 🔻)
100%
94.12% (-5.88% 🔻)

Test suite run success

168 tests passing in 16 suites.

Report generated by 🧪jest coverage report action from fe0f849

@lampajr lampajr force-pushed the gh-96_gitlab_token_not_parsed branch from ba4b20e to fe0f849 Compare February 23, 2024 10:51
@lampajr
Copy link
Member Author

lampajr commented Feb 23, 2024

Hey @peat-psuwit here the PR that should fix the token parsing from env variables.

If you want to give it a try to check if this works for you as well it would be awesome, otherwise I can go ahead and merge it! Let me know 🚀

@peat-psuwit
Copy link
Contributor

Hello. That's a quick fix! I've tested it on my code, and it works well. Thank you.

@lampajr lampajr merged commit c57fca6 into kiegroup:main Feb 23, 2024
4 checks passed
@lampajr lampajr deleted the gh-96_gitlab_token_not_parsed branch February 23, 2024 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GITLAB_TOKEN environment variable not used for API call
2 participants