This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Closed
Conversation
TriplEight
approved these changes
Apr 16, 2021
gabreal
reviewed
Apr 20, 2021
| # in Github or Gitlab CI | ||
| github_token() { | ||
| # These will exist if the function is called in Gitlab. | ||
| # If the function's called in Github, we should have GITHUB_ACCESS_TOKEN set |
Contributor
There was a problem hiding this comment.
will this token then be used by the curl calls? otherwise setting it from another else block would help.
gabreal
reviewed
Apr 20, 2021
| remove_label 'paritytech/substrate' "${CI_COMMIT_REF_NAME}" 'A7-needspolkadotpr' | ||
| exit 0 | ||
| else | ||
| add_label 'paritytech/substrate' "${CI_COMMIT_REF_NAME}" 'A7-needspolkadotpr' |
Contributor
There was a problem hiding this comment.
how about the error handling here if this is running from a pr? i used to use a helper job for this like here: https://gitlab.parity.io/parity/infrastructure/github-api/-/blob/master/.gitlab-ci.yml
|
Hey, is anyone still working on this? Due to the inactivity this issue has been automatically marked as stale. It will be closed if no further activity occurs. Thank you for your contributions. |
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously, we had a Github Action that would continuously monitor the status of the
check_polkadot_companion_buildjob against a PR and label it depending on the outcome of that job. This PR just moves that logic into thecheck_polkadot_companion_builditself. This'll hopefully do some work to reduce the amount of Github API calls we use, thus hopefully avoid issues such as this.While I was there, I also neatened up how we consume the GITHUB_TOKEN in
lib.shand fixed some shellcheck nags.Fixes paritytech/ci_cd#125
EDIT: Realised why this was a Github Action in the first place... Gitlab CI jobs running on PRs aren't protected branches (obviously), so don't have access to a Github token capable of updating labels on PRs. It's a bit shit and unless I come up with something to work around this, we're essentially stuck.