-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'ibm/main' into dag-deprecate-none-args
- Loading branch information
Showing
509 changed files
with
68,772 additions
and
38,951 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Backport metadata | ||
|
||
# Mergify manages the opening of the backport PR, this workflow is just to extend its behaviour to | ||
# do useful things like copying across the tagged labels and milestone from the base PR. | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
branches: | ||
- 'stable/*' | ||
|
||
jobs: | ||
copy_metadata: | ||
name: Copy metadata from base PR | ||
runs-on: ubuntu-latest | ||
if: github.repository == 'Qiskit/qiskit' && github.actor == 'mergify[bot]' | ||
|
||
permissions: | ||
pull-requests: write | ||
|
||
steps: | ||
- name: Copy metadata | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
set -e | ||
# Split Mergify's ref name (e.g. 'mergify/bp/stable/0.25/pr-10828') on the final '-' to | ||
# get the number of the PR that triggered Mergify. | ||
IFS='-' read -ra split <<< "${{ github.event.pull_request.head.ref }}" | ||
base_pr=${split[-1]} | ||
gh pr --repo "${{ github.repository }}" view "$base_pr" --json labels,milestone > base_pr.json | ||
add_labels="$(jq --raw-output '[.labels[].name] - ["stable backport potential"] | join(",")' base_pr.json)" | ||
echo "New labels: '$add_labels'" | ||
milestone="$(jq --raw-output '.milestone.title // ""' base_pr.json )" | ||
echo "Milestone: '$milestone'" | ||
echo "Targetting current PR '${{ github.event.number }}'" | ||
# The GitHub API is sometimes weird about empty values - the REST API certainly treats | ||
# "add-label" with an empty input not as a no-op but as a clear of all labels. | ||
if [[ -n "$add_labels" && -n "$milestone" ]]; then | ||
gh pr --repo "${{ github.repository }}" edit "${{ github.event.number }}" --add-label "$add_labels" --milestone "$milestone" | ||
elif [[ -n "$add_labels" ]]; then | ||
gh pr --repo "${{ github.repository }}" edit "${{ github.event.number }}" --add-label "$add_labels" | ||
elif [[ -n "$milestone" ]]; then | ||
gh pr --repo "${{ github.repository }}" edit "${{ github.event.number }}" --milestone "$milestone" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,7 @@ jobs: | |
latest_tag: ${{ steps.latest_tag.outputs.latest_tag }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
with: | ||
# We need to fetch the whole history so 'reno' can do its job and we can inspect tags. | ||
fetch-depth: 0 | ||
|
@@ -53,11 +53,6 @@ jobs: | |
- name: Install dependencies | ||
run: tools/install_ubuntu_docs_dependencies.sh | ||
|
||
# Sync with '.azure/tutorials-linux.yml'. | ||
- name: Download current tutorials | ||
run: tools/prepare_tutorials.bash circuits circuits_advanced operators | ||
shell: bash | ||
|
||
# This is just to have tox create the environment, so we can use it to execute the tutorials. | ||
# We want to re-use it later for the build, hence 'tox run --notest' instead of 'tox devenv'. | ||
- name: Prepare Python environment | ||
|
@@ -110,7 +105,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
with: | ||
path: qiskit | ||
|
||
|
@@ -211,7 +206,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
with: | ||
path: 'qiskit' | ||
|
||
|
@@ -220,49 +215,9 @@ jobs: | |
name: qiskit-translatables | ||
path: 'deploy' | ||
|
||
- name: Decrypt SSH secret key | ||
- name: Deploy translations | ||
id: ssh_key | ||
run: | | ||
set -e | ||
ssh_key=$(openssl enc -aes-256-cbc -d -in qiskit/tools/github_poBranch_update_key.enc -K $SSH_UPDATE_KEY -iv $SSH_UPDATE_IV) | ||
echo "::add-mask::${ssh_key}" | ||
echo "ssh_key=${ssh_key}" >> "$GITHUB_OUTPUT" | ||
run: qiskit/tools/deploy_translatable_strings.sh | ||
env: | ||
SSH_UPDATE_KEY: ${{ secrets.ENCRYPTED_DEPLOY_PO_BRANCH_KEY }} | ||
SSH_UPDATE_IV: ${{ secrets.ENCRYPTED_DEPLOY_PO_BRANCH_IV }} | ||
|
||
- uses: actions/checkout@v3 | ||
with: | ||
repository: 'qiskit-community/qiskit-translations' | ||
path: 'qiskit-translations' | ||
ssh-key: '${{ steps.ssh_key.outputs.ssh_key }}' | ||
|
||
- name: Remove ignored documents | ||
run: rm -r LC_MESSAGES/{apidocs,stubs} | ||
working-directory: 'deploy' | ||
|
||
- name: Push changes to translations repository | ||
run: | | ||
set -e | ||
shopt -s failglob | ||
# Bring the new `.po` target files into the repository. | ||
git rm -r --ignore-unmatch docs/locale/en | ||
mv "${{ github.workspace }}/deploy" docs/locale/en | ||
# Update the ways to recreate the build. | ||
cp "${{ github.workspace }}/qiskit/"{setup.py,requirements-*.txt,constraints.txt} . | ||
git add . | ||
cat > COMMIT_MSG << EOF | ||
Automated documentation update to add .po files from ${{ github.repository }} | ||
skip ci | ||
Commit: ${{ github.sha }} | ||
GitHub Actions run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | ||
EOF | ||
git config user.name "Qiskit Autodeploy" | ||
git config user.email "[email protected]" | ||
git commit -F COMMIT_MSG | ||
git push origin | ||
working-directory: 'qiskit-translations' | ||
encrypted_deploy_po_branch_key: ${{ secrets.ENCRYPTED_DEPLOY_PO_BRANCH_KEY }} | ||
encrypted_deploy_po_branch_iv: ${{ secrets.ENCRYPTED_DEPLOY_PO_BRANCH_IV }} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.