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

chore: Uses PAT of bot to commit changelog updates #2144

Merged
merged 2 commits into from
Apr 12, 2024

Conversation

oarbusi
Copy link
Collaborator

@oarbusi oarbusi commented Apr 12, 2024

Description

Uses PAT of bot to commit changelog updates to bypass branch protection rules

Link to any related issue(s):

Type of change:

  • Bug fix (non-breaking change which fixes an issue). Please, add the "bug" label to the PR.
  • New feature (non-breaking change which adds functionality). Please, add the "enhancement" label to the PR.
  • Breaking change (fix or feature that would cause existing functionality to not work as expected). Please, add the "breaking change" label to the PR.
  • This change requires a documentation update
  • Documentation fix/enhancement

Required Checklist:

  • I have signed the MongoDB CLA
  • I have read the contributing guides
  • I have checked that this change does not generate any credentials and that they are NOT accidentally logged anywhere.
  • I have added tests that prove my fix is effective or that my feature works per HashiCorp requirements
  • I have added any necessary documentation (if appropriate)
  • I have run make fmt and formatted my code
  • If changes include deprecations or removals, I defined an isolated PR with a relevant title as it will be used in the auto-generated changelog.
  • If changes include removal or addition of 3rd party GitHub actions, I updated our internal document. Reach out to the APIx Integration slack channel to get access to the internal document.

Further comments

@oarbusi oarbusi marked this pull request as ready for review April 12, 2024 13:45
@oarbusi oarbusi requested a review from a team as a code owner April 12, 2024 13:45
Comment on lines -28 to -29
git config --local user.email [email protected]
git config --local user.name changelogbot
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this have to be removed? Not sure if the svc account details would be used automatically, we can try.

Copy link
Collaborator Author

@oarbusi oarbusi Apr 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As per my understanding, setting the token in the checkout action is enough to be authenticated with that account.
description of token attribute of the checkout action: Personal access token (PAT) used to fetch the repository. The PAT is configured with the local git config, which enables your scripts to run authenticated git commands. The post-job step removes the PAT.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct, my doubt is if git will still be missing author information for the actual commit. Either way we can try and adjust if needed.

@oarbusi oarbusi merged commit 8d17aa9 into master Apr 12, 2024
50 checks passed
@oarbusi oarbusi deleted the use-svc-apix-for-commits-to-master branch April 12, 2024 15:17
lantoli added a commit that referenced this pull request Apr 15, 2024
* master:
  fix: Removes default comment when creating resource `mongodbatlas_privatelink_endpoint_serverless` and adds update support to `mongodbatlas_privatelink_endpoint_service_serverless` (#2133)
  doc: Documents testing best practices (#2132)
  chore: Uses correct format when setting remote (#2147)
  chore: Configures git correctly for automatic commit (#2146)
  chore: Uses PAT of bot to commit changelog updates (#2144)
  doc: Adjust RELEASING.md documentation with new process (#2142)
  fix: Fixes nil pointer dereference if `advanced_configuration` update fails in `mongodbatlas_cluster` (#2139)
  chore: Adds a  new step in release process that marks Jira version as released (#2136)
  chore: Sends Slack notification when changelog update fails (#2140)
  chore: Adds new step in release process for updating header of changelog (#2134)
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.

2 participants