Skip to content

Conversation

manastasova
Copy link
Contributor

Add support for checking out specific commits in s2n-bignum import.sh

Example usage:
GITHUB_REPOSITORY=awslabs/s2n-bignum GITHUB_TARGET=main COMMIT_HASH=717b57a ./import.sh

Issues:

Addresses: Allow to choose s2n-bignum specific commit

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.

Example usage:
GITHUB_REPOSITORY=awslabs/s2n-bignum GITHUB_TARGET=main COMMIT_HASH=717b57a ./import.sh
@manastasova manastasova requested a review from a team as a code owner August 27, 2025 23:13
@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.74%. Comparing base (6d2eb62) to head (1b3f308).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2646      +/-   ##
==========================================
- Coverage   78.74%   78.74%   -0.01%     
==========================================
  Files         646      646              
  Lines      111238   111238              
  Branches    15712    15704       -8     
==========================================
- Hits        87591    87590       -1     
- Misses      22953    22958       +5     
+ Partials      694      690       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@@ -49,7 +50,7 @@ mkdir ${TMP}

echo "Fetching repository ..."
git clone ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY} ${TMP} --branch ${GITHUB_TARGET} --single-branch > /dev/null
GITHUB_COMMIT=$(cd ${TMP} >/dev/null; git rev-parse HEAD)
GITHUB_COMMIT=$(cd ${TMP} > /dev/null; git checkout ${COMMIT_HASH} > /dev/null; git rev-parse HEAD)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion: Follow the mlkem-native importer and only import the exact commit you care about. At the same time, remove distinction between GITHUB_TARGET and COMMIT_HASH:

git init >/dev/null
git remote add origin $GITHUB_SERVER_URL/$GITHUB_REPOSITORY >/dev/null
git fetch origin --depth 1 $GITHUB_SHA >/dev/null
git checkout FETCH_HEAD >/dev/null

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.

3 participants