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

chore(ci): migrate from hub to gh #3168

Merged
merged 1 commit into from Apr 19, 2021
Merged

chore(ci): migrate from hub to gh #3168

merged 1 commit into from Apr 19, 2021

Conversation

oxy
Copy link

@oxy oxy commented Apr 19, 2021

Notes -
In addition to moving our two hub calls to gh, I also replaced the curl calls that depend on GITHUB_TOKEN being set in ci/lib.sh with gh api calls instead; the benefit is that this also allows alternative auth (stored in ~/.config/gh/hosts.yml instead of env).

Closes #2960.

@oxy oxy requested a review from a team as a code owner April 19, 2021 20:10
Copy link
Contributor

@jsjoeio jsjoeio left a comment

Choose a reason for hiding this comment

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

Fantastic work! 🎉

@@ -68,6 +60,14 @@ main() {
exit
fi

# Check that gh is authenticated
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice addition!

# For releases, we look for run based on the branch name v$code_server_version
# example: v3.9.3
local version_branch="v$VERSION"
artifacts_url=$(curl -fsSL "$workflow_runs_url" | jq -r ".workflow_runs[] | select(.head_branch == \"$version_branch\") | .artifacts_url" | head -n 1)
artifacts_url=$(gh api "$workflow_runs_url" | jq -r ".workflow_runs[] | select(.head_branch == \"$version_branch\") | .artifacts_url" | head -n 1)
Copy link
Contributor

Choose a reason for hiding this comment

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

🔥

@oxy oxy merged commit 724ee93 into main Apr 19, 2021
@oxy oxy deleted the oxy/hub-to-gh branch April 19, 2021 20:51
@jsjoeio jsjoeio added this to 🚧 In progress in Clean Up via automation Apr 19, 2021
@jsjoeio jsjoeio added this to the v3.9.4 milestone Apr 19, 2021
@jsjoeio jsjoeio moved this from 🚧 In progress to ✅ Done in Clean Up Apr 19, 2021
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.

[dev]: replace hub with gh
2 participants