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(ci): fix packaging check merge operation #5750

Merged
merged 1 commit into from
Sep 27, 2024

Conversation

aciba90
Copy link
Contributor

@aciba90 aciba90 commented Sep 27, 2024

Proposed Commit Message

fix(ci): fix packaging check merge operation

github.sha does not always points to the last commit in the
source branch of a PR, leading to errors like the following one while
performing:

  $ git merge ${{ github.sha }}
  merge: d8432eda1ea1c722f6ff635f06c5f1d9c694a46f - not something we can merge

Use github.event.pull_request.head.sha instead.

See [1, 2] for more context:

- [1] https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#pull_request
- [2] https://github.com/orgs/community/discussions/26325

Additional Context

https://github.com/canonical/cloud-init/actions/runs/11067025369/job/30749489286?pr=5655

Test Steps

Merge type

  • Squash merge using "Proposed Commit Message"
  • Rebase and merge unique commits. Requires commit messages per-commit each referencing the pull request number (#<PR_NUM>)

github.sha does not always points to the last commit in the
source branch of a PR, leading to errors like the following one while
performing:

  $ git merge ${{ github.sha }}
  merge: d8432ed - not something we can merge

Use github.event.pull_request.head.sha instead.

See [1, 2] for more context:

- [1] https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#pull_request
- [2] https://github.com/orgs/community/discussions/26325
Copy link
Member

@holmanb holmanb left a comment

Choose a reason for hiding this comment

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

Thanks @aciba90!

@aciba90 aciba90 merged commit bbe6191 into canonical:main Sep 27, 2024
21 checks passed
@aciba90 aciba90 deleted the fix-gh-check-patches branch September 27, 2024 12:44
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