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

[No QA] Remove unnecessary sparse checkout from setupGitForOSBotifyApp #56469

Merged
merged 3 commits into from
Feb 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions .github/actions/composite/setupGitForOSBotifyApp/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,6 @@ outputs:
runs:
using: composite
steps:
- name: Check if gpg encrypted private key is present
id: key_check
shell: bash
run: |
if [[ -f .github/workflows/OSBotify-private-key.asc.gpg ]]; then
echo "key_exists=true" >> "$GITHUB_OUTPUT"
fi

- name: Checkout
uses: actions/checkout@v4
if: steps.key_check.outputs.key_exists != 'true'
with:
sparse-checkout: |
.github

- name: Install 1Password CLI
uses: 1password/install-cli-action@v1

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ GithubUtils.octokit.pulls
.then(({data: PR}) => {
if (!isEmptyObject(PR)) {
console.log(`Found matching pull request: ${PR.html_url}`);
console.log(`Pull request details: ${JSON.stringify(PR)}}`);
core.setOutput('MERGE_COMMIT_SHA', PR.merge_commit_sha);
core.setOutput('HEAD_COMMIT_SHA', PR.head?.sha);
core.setOutput('IS_MERGED', PR.merged);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11502,6 +11502,7 @@ GithubUtils_1.default.octokit.pulls
.then(({ data: PR }) => {
if (!(0, EmptyObject_1.isEmptyObject)(PR)) {
console.log(`Found matching pull request: ${PR.html_url}`);
console.log(`Pull request details: ${JSON.stringify(PR)}}`);
core.setOutput('MERGE_COMMIT_SHA', PR.merge_commit_sha);
core.setOutput('HEAD_COMMIT_SHA', PR.head?.sha);
core.setOutput('IS_MERGED', PR.merged);
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/cherryPick.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,19 @@ jobs:
SEMVER_LEVEL: "PATCH"

- name: Fetch history of relevant refs
run: |
git fetch origin main staging --no-tags --shallow-exclude ${{ steps.getPreviousVersion.outputs.PREVIOUS_VERSION }}
run: git fetch origin main staging --no-tags --shallow-exclude ${{ steps.getPreviousVersion.outputs.PREVIOUS_VERSION }}

- name: Get version bump commit
id: getVersionBumpCommit
run: |
git switch main
VERSION_BUMP_COMMIT="$(git log --format='%H' --author='OSBotify' --grep 'Update version to ${{ needs.createNewVersion.outputs.NEW_VERSION }}')"
if [ -z "$VERSION_BUMP_COMMIT" ]; then
echo "::error::❌ Could not find version bump commit for ${{ needs.createNewVersion.outputs.NEW_VERSION }}"
git log --oneline
else
echo "::notice::👀 Found version bump commit $VERSION_BUMP_COMMIT"
fi
echo "VERSION_BUMP_SHA=$VERSION_BUMP_COMMIT" >> "$GITHUB_OUTPUT"

- name: Get merge commit for pull request to CP
Expand Down