mcu/stm32: Fix hal_nvreg for STM32F1 #17
This file contains hidden or 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
| # | |
| # Licensed to the Apache Software Foundation (ASF) under one | |
| # or more contributor license agreements. See the NOTICE file | |
| # distributed with this work for additional information | |
| # regarding copyright ownership. The ASF licenses this file | |
| # to you under the Apache License, Version 2.0 (the | |
| # "License"); you may not use this file except in compliance | |
| # with the License. You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, | |
| # software distributed under the License is distributed on an | |
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | |
| # KIND, either express or implied. See the License for the | |
| # specific language governing permissions and limitations | |
| # under the License. | |
| # | |
| name: Remove informative CI status | |
| on: [push, pull_request] | |
| permissions: | |
| contents: read | |
| issues: write | |
| pull-requests: write | |
| jobs: | |
| remove-ci-label: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const label = 'needs-ci-approval'; | |
| const pr = context.payload.pull_request; | |
| if (!pr) { | |
| core.info('No pull_request in event payload. Skipping.'); | |
| return; | |
| } | |
| const issue_number = pr.number; | |
| // List current labels on the PR (use PR number from payload) | |
| let labels = []; | |
| try { | |
| const res = await github.rest.issues.listLabelsOnIssue({ | |
| ...context.repo, | |
| issue_number, | |
| }); | |
| labels = res.data || []; | |
| } catch (e) { | |
| core.info(`Could not list labels on PR #${issue_number}: ${e.status || ''} ${e.message}. Skipping.`); | |
| return; | |
| } | |
| const hasLabel = labels.some(l => l.name === label); | |
| if (!hasLabel) { | |
| core.info(`'${label}' not present — nothing to do.`); | |
| return; | |
| } | |
| // Remove if label is present | |
| try { | |
| await github.rest.issues.removeLabel({ | |
| ...context.repo, | |
| issue_number, | |
| name: label, | |
| }); | |
| core.info(`Removed '${label}' from PR #${issue_number}.`); | |
| } catch (e) { | |
| if (e.status === 404) { | |
| core.info(`'${label}' already gone.`); | |
| } else { | |
| core.info(`Failed to remove '${label}' on PR #${issue_number}: ${e.status || ''} ${e.message}. Skipping.`); | |
| } | |
| } |